]> git.openstreetmap.org Git - nominatim.git/commitdiff
update.php - check file exists before deleting
authorMarc Tobias Metten <mtmail@gmx.net>
Tue, 30 Jan 2018 23:38:05 +0000 (00:38 +0100)
committerMarc Tobias Metten <mtmail@gmx.net>
Tue, 30 Jan 2018 23:38:05 +0000 (00:38 +0100)
utils/update.php

index d38a854aa09dda5e246ab315c01117cf5d22e3a4..d34010c78eb3f9ab2faddbfef2a5a7ba42577359 100755 (executable)
@@ -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) {