]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix variable name in setup --drop
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 24 Nov 2018 11:29:00 +0000 (12:29 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 24 Nov 2018 11:29:00 +0000 (12:29 +0100)
lib/setup/SetupClass.php

index f03085f8c39159c11f9a94607768f285286cec3c..5c6d69e43bcf52160b943008b05c7a506a27d642 100755 (executable)
@@ -703,15 +703,17 @@ class SetupFunctions
             if (!$bFound) array_push($aDropTables, $sTable);
         }
         foreach ($aDropTables as $sDrop) {
-            if ($this->sVerbose) echo "dropping table $sDrop\n";
+            if ($this->sVerbose) echo "Dropping table $sDrop\n";
             @pg_query($this->oDB->connection, "DROP TABLE $sDrop CASCADE");
             // ignore warnings/errors as they might be caused by a table having
             // been deleted already by CASCADE
         }
 
         if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) {
-            if ($sVerbose) echo 'deleting '.CONST_Osm2pgsql_Flatnode_File."\n";
-            unlink(CONST_Osm2pgsql_Flatnode_File);
+            if (file_exists(CONST_Osm2pgsql_Flatnode_File)) {
+                if ($this->sVerbose) echo 'Deleting '.CONST_Osm2pgsql_Flatnode_File."\n";
+                unlink(CONST_Osm2pgsql_Flatnode_File);
+            }
         }
     }