Explorar o código

Make sure we are running on Windows before fclose() to avoid race condition possible in Nix.

tsimmons %!s(int64=7) %!d(string=hai) anos
pai
achega
9973b13e19
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      update.php

+ 3 - 3
update.php

@@ -404,8 +404,8 @@
 
 	PluginHost::getInstance()->run_commands($options);
 
-	if (file_exists(LOCK_DIRECTORY . "/$lock_filename")) {
-		fclose($lock_handle);
+	if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))
+		if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
+			fclose($lock_handle);
 		unlink(LOCK_DIRECTORY . "/$lock_filename");
-	}
 ?>