update.php - check file exists before deleting

This commit is contained in:
Marc Tobias Metten
2018-01-31 00:38:05 +01:00
parent ae1df044e2
commit 1d6861667b

View File

@@ -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) {