ソースを参照

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

Andrew Dolgov 7 年 前
コミット
370fe2bdcd
1 ファイル変更2 行追加0 行削除
  1. 2 0
      update.php

+ 2 - 0
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");
 ?>