From 4250a5e09885284764620c6defa9fc42affee0ab Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Fri, 11 Jul 2025 18:19:34 +0200 Subject: [PATCH] connectcore-demo-example: preserve "swu" file in update_firmware Avoid deleting the original "swu" firmware file during the update process, especially in dual-boot systems. Previously, the file could be removed from the source path even in the event of an exception. This change ensures the original file remains intact regardless of update outcome. Signed-off-by: Isaac Hermida --- connectcore-demo-example/demoserver.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/connectcore-demo-example/demoserver.py b/connectcore-demo-example/demoserver.py index 1a6a23c..701fa5e 100755 --- a/connectcore-demo-example/demoserver.py +++ b/connectcore-demo-example/demoserver.py @@ -570,8 +570,6 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler): self.wfile.write(json.dumps({"error": e.stdout}).encode(encoding="utf_8")) fw_process = None - if is_dual_system() and os.path.exists(path): - os.remove(path) elif re.search("/ajax/check_firmware_update_running", self.path) is not None: # Set the response headers. self._set_headers(200)