Ensure all creations of directories create the parents too (#5711)

This commit is contained in:
Trenton H
2024-02-10 11:02:40 -08:00
committed by GitHub
parent 0b1523f4e5
commit 13201dbfff
11 changed files with 22 additions and 38 deletions

View File

@@ -88,7 +88,7 @@ def open_index(recreate=False) -> FileIndex:
logger.exception("Error while opening the index, recreating.")
if not os.path.isdir(settings.INDEX_DIR):
os.makedirs(settings.INDEX_DIR, exist_ok=True)
settings.INDEX_DIR.mkdir(parents=True, exist_ok=True)
return create_in(settings.INDEX_DIR, get_schema())