From 1d6861667bedb9469eda104229a13df07ecad0a9 Mon Sep 17 00:00:00 2001 From: Marc Tobias Metten Date: Wed, 31 Jan 2018 00:38:05 +0100 Subject: [PATCH] update.php - check file exists before deleting --- utils/update.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/update.php b/utils/update.php index d38a854a..d34010c7 100755 --- a/utils/update.php +++ b/utils/update.php @@ -300,7 +300,9 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) { $iNextSeq = (int) $aLastState['sequence_id']; unset($aOutput); echo "$sCMDDownload -I $iNextSeq\n"; - unlink($sImportFile); + if (file_exists($sImportFile)) { + unlink($sImportFile); + } exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult); if ($iResult == 3) { -- 2.45.1