Merge pull request #900 from mtmail/check-file-exist-before-delete

update.php - check file exists before deleting
This commit is contained in:
Sarah Hoffmann
2018-01-31 08:58:32 +01:00
committed by GitHub

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