Commit 370fe2bd authored by Andrew Dolgov's avatar Andrew Dolgov

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
parents 8b8568e9 9973b13e
......@@ -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");
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment