From 2172aa02a8f3ca6c260c12e68276e304a3ae55f5 Mon Sep 17 00:00:00 2001 From: Vladless Date: Thu, 29 May 2025 14:37:22 +0300 Subject: [PATCH] Preserve images inside the img/ folder during updates --- cli_launcher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli_launcher.py b/cli_launcher.py index 34fef7ae..1a921053 100755 --- a/cli_launcher.py +++ b/cli_launcher.py @@ -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: