summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authortsimmons <[email protected]>2017-01-06 11:06:09 -0600
committertsimmons <[email protected]>2017-01-06 11:06:09 -0600
commit9973b13e197eb7fef58dbcb25744757c2788781e (patch)
tree4feb9e83339cf296fe2bf2fc682fc079691e7cbc /update.php
parent8231c039edb45ead97bde5b0a0b96b2b24b28768 (diff)
Make sure we are running on Windows before fclose() to avoid race condition possible in Nix.
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/update.php b/update.php
index ec6875971..65cf9f06e 100755
--- a/update.php
+++ b/update.php
@@ -404,8 +404,8 @@
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");
- }
?>