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 <isaac.hermida@digi.com>
This commit is contained in:
parent
14911565e8
commit
4250a5e098
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue