]> git.openstreetmap.org Git - nominatim.git/commitdiff
updates: always remove output file and start with correct sequence id
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 27 May 2017 15:02:34 +0000 (17:02 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 27 May 2017 15:02:34 +0000 (17:02 +0200)
utils/update.php

index a1b5e54cab8116713745285a49328b831c9c0683..2b72fe821e0e390fa9ea5f5690758d8ec6aaa63f 100755 (executable)
@@ -262,12 +262,12 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) {
             }
 
             // Download the next batch of changes.
-            unlink($sImportFile);
             do {
                 $fCMDStartTime = time();
-                $iNextSeq = (int) $aLastState['sequence_id'] + 1;
+                $iNextSeq = (int) $aLastState['sequence_id'];
                 unset($aOutput);
                 echo "$sCMDDownload -I $iNextSeq\n";
+                unlink($sImportFile);
                 exec($sCMDDownload.' -I '.$iNextSeq, $aOutput, $iResult);
 
                 if ($iResult == 3) {