fix: data directory path construction avoids double slash duplicates

This commit is contained in:
Abdessamad Derraz
2026-03-27 12:42:21 +01:00
parent 8f1c7e47de
commit a117b13b49

View File

@@ -468,7 +468,12 @@ def generate_pack(
print(f" WARNING: data directory '{ref_key}' not cached at {local_path} — run refresh_data_dirs.py")
continue
dd_dest = dd.get("destination", "")
dd_prefix = f"{base_dest}/{dd_dest}" if base_dest else dd_dest
if base_dest and dd_dest:
dd_prefix = f"{base_dest}/{dd_dest}"
elif base_dest:
dd_prefix = base_dest
else:
dd_prefix = dd_dest
for root, _dirs, filenames in os.walk(local_path):
for fname in filenames:
src = os.path.join(root, fname)