diff --git a/lean/components/config/lean_config_manager.py b/lean/components/config/lean_config_manager.py index f4892340..0a765922 100644 --- a/lean/components/config/lean_config_manager.py +++ b/lean/components/config/lean_config_manager.py @@ -98,11 +98,10 @@ def get_known_lean_config_paths(self) -> List[Path]: :return: a list of paths to Lean config files that were used in the past """ lean_config_paths = self._cache_storage.get("known-lean-config-paths", []) - lean_config_paths = [Path(p) for p in lean_config_paths] + lean_config_paths = [Path(normcase(p)) for p in lean_config_paths if Path(p).is_file()] lean_config_paths = list(set(lean_config_paths)) - lean_config_paths = [p for p in lean_config_paths if p.is_file()] - self._cache_storage.set("known-lean-config-paths", [normcase(p) for p in lean_config_paths]) + self._cache_storage.set("known-lean-config-paths", [str(p) for p in lean_config_paths]) return lean_config_paths