Make sure both temp folders exist

This commit is contained in:
DominikDoom
2023-07-23 09:01:26 +02:00
parent 39ea33be9f
commit acb85d7bb1
2 changed files with 7 additions and 3 deletions

View File

@@ -7,8 +7,6 @@ from scripts.shared_paths import EXT_PATH, STATIC_TEMP_PATH, TEMP_PATH
# Set up our hash cache
known_hashes_file = TEMP_PATH.joinpath("known_lora_hashes.txt")
if not TEMP_PATH.exists():
TEMP_PATH.mkdir()
known_hashes_file.touch()
file_needs_update = False

View File

@@ -44,4 +44,10 @@ WILDCARD_EXT_PATHS = find_ext_wildcard_paths()
# The path to the temporary files
STATIC_TEMP_PATH = FILE_DIR.joinpath('tmp') # In the webui root, on windows it exists by default, on linux it doesn't
TEMP_PATH = TAGS_PATH.joinpath('temp') # Extension specific temp files
TEMP_PATH = TAGS_PATH.joinpath('temp') # Extension specific temp files
# Make sure these folders exist
if not TEMP_PATH.exists():
TEMP_PATH.mkdir()
if not STATIC_TEMP_PATH.exists():
STATIC_TEMP_PATH.mkdir()