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
This commit is contained in:
Andrew Dolgov 2017-01-06 20:18:06 +03:00
commit 370fe2bdcd
1 changed files with 2 additions and 0 deletions

View File

@ -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");
?>