summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-01-06 20:18:06 +0300
committerAndrew Dolgov <[email protected]>2017-01-06 20:18:06 +0300
commit370fe2bdcdb9042310d0d86fe10b78174a7d1cf1 (patch)
tree4feb9e83339cf296fe2bf2fc682fc079691e7cbc /update.php
parent8b8568e9a3396b61778038cd55d4f1715db6b070 (diff)
parent9973b13e197eb7fef58dbcb25744757c2788781e (diff)
Merge branch 'fclose-before-unlink-updater' into 'master'
If Windows, fclose() before unlink() in updater.php Windows barks an error if you try to unlink() a file while the pointer is still open(); If running under Windows, fclose() the handle before the unlink(); See merge request !36
Diffstat (limited to 'update.php')
-rwxr-xr-xupdate.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/update.php b/update.php
index f17436185..65cf9f06e 100755
--- a/update.php
+++ b/update.php
@@ -405,5 +405,7 @@
PluginHost::getInstance()->run_commands($options);
if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))
+ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
+ fclose($lock_handle);
unlink(LOCK_DIRECTORY . "/$lock_filename");
?>