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
master
Andrew Dolgov 8 years ago
commit 370fe2bdcd

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

Loading…
Cancel
Save