]> git.wh0rd.org - tt-rss.git/blobdiff - update.php
Make sure we are running on Windows before fclose() to avoid race condition possible...
[tt-rss.git] / update.php
index ec6875971cbb315bc3221ad08d24eaa4164aa43b..65cf9f06efbea909b923a305abf6d954dca1b020 100755 (executable)
 
        PluginHost::getInstance()->run_commands($options);
 
-       if (file_exists(LOCK_DIRECTORY . "/$lock_filename")) {
-               fclose($lock_handle);
+       if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))
+               if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
+                       fclose($lock_handle);
                unlink(LOCK_DIRECTORY . "/$lock_filename");
-       }
 ?>