X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/71ef94dae6c09004994d6790b23ffdb053dfc12a..14cef94e615c3ae9b128a115c7d770f0f075b694:/lib/setup/SetupClass.php diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index f03085f8..5c6d69e4 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -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); + } } }