Compare commits

..

2 Commits
2.7.1 ... 2.7.3

Author SHA1 Message Date
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

View File

@@ -7,6 +7,8 @@ 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
@@ -15,7 +17,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)