From: Marc Tobias Metten Date: Tue, 30 Jan 2018 23:38:05 +0000 (+0100) Subject: update.php - check file exists before deleting X-Git-Tag: v3.2.0~133^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/1d6861667bedb9469eda104229a13df07ecad0a9 update.php - check file exists before deleting --- 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) {