Compare commits

..

3 Commits
2.7.1 ... 2.7.4

Author SHA1 Message Date
DominikDoom
acb85d7bb1 Make sure both temp folders exist 2023-07-23 09:01:26 +02:00
DominikDoom
39ea33be9f Fix encoding for load too
Fixes #204
2023-07-22 21:15:44 +02:00
DominikDoom
1cac893e63 Create temp folder first before touching if it doesn't exist
Fixes #203
2023-07-22 20:46:10 +02:00
2 changed files with 8 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ hash_dict = {}
def load_hash_cache():
with open(known_hashes_file, "r") as file:
with open(known_hashes_file, "r", encoding="utf-8") as file:
for line in file:
name, hash, mtime = line.replace("\n", "").split(",")
hash_dict[name] = (hash, mtime)

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()