From abd882115f29facc00cc145b3fa87406f16a9f2b Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Mon, 16 Dec 2024 10:34:35 +0100 Subject: [PATCH] Warn about and ignore project files with spaces when scanning for projects --- src/config_generator/config_generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config_generator/config_generator.py b/src/config_generator/config_generator.py index 205d32d..0c81272 100644 --- a/src/config_generator/config_generator.py +++ b/src/config_generator/config_generator.py @@ -738,6 +738,9 @@ def search_qgs_projects(self, generator_config, themes_config): elif item.is_file() and item.suffix == qgis_project_extension: relpath = item.parent.relative_to(qgis_projects_base_dir) wmspath = os.path.join(self.ows_prefix, relpath, item.stem) + if ' ' in wmspath: + self.logger.warning(f"The project file '{os.path.join(relpath, item.stem)}' contains spaces, it will be ignored") + continue # Add to themes items theme_item = OrderedDict()