From: tsimmons Date: Fri, 6 Jan 2017 17:06:09 +0000 (-0600) Subject: Make sure we are running on Windows before fclose() to avoid race condition possible... X-Git-Tag: 17.1~23^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9973b13e197eb7fef58dbcb25744757c2788781e;p=tt-rss.git Make sure we are running on Windows before fclose() to avoid race condition possible in Nix. --- diff --git a/update.php b/update.php index ec687597..65cf9f06 100755 --- a/update.php +++ b/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"); - } ?>