forked from hans/Nominatim
update.php - check file exists before deleting
This commit is contained in:
@@ -300,7 +300,9 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) {
|
|||||||
$iNextSeq = (int) $aLastState['sequence_id'];
|
$iNextSeq = (int) $aLastState['sequence_id'];
|
||||||
unset($aOutput);
|
unset($aOutput);
|
||||||
echo "$sCMDDownload -I $iNextSeq\n";
|
echo "$sCMDDownload -I $iNextSeq\n";
|
||||||
unlink($sImportFile);
|
if (file_exists($sImportFile)) {
|
||||||
|
unlink($sImportFile);
|
||||||
|
}
|
||||||
exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult);
|
exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult);
|
||||||
|
|
||||||
if ($iResult == 3) {
|
if ($iResult == 3) {
|
||||||
|
|||||||
Reference in New Issue
Block a user