mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
apps: fix edge case when upgrading using a local folder not modified since a while
This commit is contained in:
parent
ce7227c078
commit
d3ec5d055f
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue