From d3ec5d055f9b748a7060eec1678a1f241f867e4d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 19 Feb 2023 18:10:35 +0100 Subject: [PATCH] apps: fix edge case when upgrading using a local folder not modified since a while --- src/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app.py b/src/app.py index afa0214eb..73fe0ebe1 100644 --- a/src/app.py +++ b/src/app.py @@ -2392,6 +2392,10 @@ def _extract_app_from_folder(path: str) -> Tuple[Dict, str]: if path[-1] != "/": path = path + "/" cp(path, extracted_app_folder, recursive=True) + # Change the last edit time which is used in _make_tmp_workdir_for_app + # to cleanup old dir ... otherwise it may end up being incorrectly removed + # at the end of the safety-backup-before-upgrade :/ + os.system(f"touch {extracted_app_folder}") else: try: shutil.unpack_archive(path, extracted_app_folder)