]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #1706 from mtmail/warn-if-no-tiger-files-found
authorSarah Hoffmann <lonvia@denofr.de>
Fri, 6 Mar 2020 21:55:37 +0000 (22:55 +0100)
committerGitHub <noreply@github.com>
Fri, 6 Mar 2020 21:55:37 +0000 (22:55 +0100)
print warning if no Tiger files found

lib/setup/SetupClass.php

index 71da57cf9dfdcb07f85e2daafcbec2ae2096582b..b422ded16bfce9aafccb1bb0cc6ad4e49e6b490f 100755 (executable)
@@ -417,8 +417,10 @@ class SetupFunctions
 
         $aFilenames = glob(CONST_Tiger_Data_Path.'/*.sql');
         info('Found '.count($aFilenames).' SQL files in path '.CONST_Tiger_Data_Path);
-        if (empty($aFilenames)) return;
-
+        if (empty($aFilenames)) {
+            warn('Tiger data import selected but no files found in path '.CONST_Tiger_Data_Path);
+            return;
+        }
         $sTemplate = file_get_contents(CONST_BasePath.'/sql/tiger_import_start.sql');
         $sTemplate = $this->replaceSqlPatterns($sTemplate);