diff --git a/dictdatabase/io_unsafe.py b/dictdatabase/io_unsafe.py index f06239f..22c3333 100644 --- a/dictdatabase/io_unsafe.py +++ b/dictdatabase/io_unsafe.py @@ -73,7 +73,7 @@ def read_index_file(db_name: str): def write_index_file(db_name: str, key, start_index, end_index, indent_level, indent_with, value_hash): - path = f"{config.storage_directory}/.ddb/{db_name.replace('/', '___')}.index" + path = f"{config.storage_directory}/.ddb/{db_name}.index" Path(path).parent.mkdir(parents=True, exist_ok=True) indices = read_index_file(db_name) indices[key] = [start_index, end_index, indent_level, indent_with, value_hash] diff --git a/profiler.py b/profiler.py index 3f84bc3..45d2a0b 100644 --- a/profiler.py +++ b/profiler.py @@ -16,7 +16,6 @@ # a2lU has many annotations # DDB.at("tasks").read(key="fM44", as_type=PathDict) for _ in range(10): - DDB.at("tasks").read(key="a2lU", as_type=PathDict) with DDB.at("tasks").session(key="a2lU", as_type=PathDict) as (session, task): task["jay"] = lambda x: (x or 0) + 1 session.write()