From 67463b8c83f2239921dfbc0efa16a4be9214a412 Mon Sep 17 00:00:00 2001 From: Krzysztof Godlewski Date: Wed, 15 Jan 2025 10:48:25 +0100 Subject: [PATCH] Make local DB file names more friendly --- src/neptune_scale/storage/operations.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/neptune_scale/storage/operations.py b/src/neptune_scale/storage/operations.py index 37de93d..de5ed7f 100644 --- a/src/neptune_scale/storage/operations.py +++ b/src/neptune_scale/storage/operations.py @@ -337,8 +337,9 @@ def _init_run( def _safe_filename(project: str, run_id: str) -> str: - # URLEncode the project name and run ID to avoid issues with special characters - filename = quote(f"{project}-{run_id}.db", safe="") + # 1. replace '/' with '__' in project name + # 2. URLEncode the project name and run ID to avoid issues with special characters + filename = quote(f"{project.replace('/', '_')}_{run_id}.db", safe="") return filename