From 015c5efbbddb141bef59b91332a84bef73b63b17 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Thu, 26 Mar 2026 15:23:03 +0000 Subject: [PATCH] fix: try underscore variant when dash-slug path not found on disk --- src/static/collector/cc-collector.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/static/collector/cc-collector.py b/src/static/collector/cc-collector.py index 3aa3848..e43128d 100644 --- a/src/static/collector/cc-collector.py +++ b/src/static/collector/cc-collector.py @@ -306,6 +306,10 @@ def _infer_repo_path(folder_name: str) -> Path | None: direct = Path(ROOT_PATH) / slug if direct.exists() and direct.is_dir(): return direct + # Some repos use underscores where the slug has dashes + direct_underscore = Path(ROOT_PATH) / slug.replace("-", "_") + if direct_underscore.exists() and direct_underscore.is_dir(): + return direct_underscore # Fallback: walk up from the heuristic slash-replaced path path_str = "/" + folder_name.lstrip("-").replace("-", "/") p = Path(path_str)