Preserve images inside the img/ folder during updates

This commit is contained in:
Vladless
2025-05-29 14:37:22 +03:00
parent 331d140b42
commit 2172aa02a8
+3
View File
@@ -107,6 +107,9 @@ def clean_project_dir_safe(update_buttons=False, update_img=False):
preserved_paths.add(os.path.join(PROJECT_DIR, "handlers", "buttons.py"))
if not update_img:
preserved_paths.add(os.path.join(PROJECT_DIR, "img"))
for root, _, files in os.walk(os.path.join(PROJECT_DIR, "img")):
for file in files:
preserved_paths.add(os.path.join(root, file))
for root, dirs, files in os.walk(PROJECT_DIR, topdown=False):
for file in files: