]> git.wh0rd.org - tt-rss.git/commitdiff
Make sure we are running on Windows before fclose() to avoid race condition possible...
authortsimmons <toby@simmonsconsulting.com>
Fri, 6 Jan 2017 17:06:09 +0000 (11:06 -0600)
committertsimmons <toby@simmonsconsulting.com>
Fri, 6 Jan 2017 17:06:09 +0000 (11:06 -0600)
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");
-       }
 ?>