From 5346617a91fde4dfedd91ad3ac2be0769cd167ed Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 29 Jul 2017 15:18:46 +1000 Subject: [PATCH] Archive unlink comes last to allow retry If the file is deleted and subsequent logic fails, clicking Retry is a show stopper --- modules/system/classes/UpdateManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/classes/UpdateManager.php b/modules/system/classes/UpdateManager.php index 13b7f35ca..de8c5c823 100644 --- a/modules/system/classes/UpdateManager.php +++ b/modules/system/classes/UpdateManager.php @@ -449,8 +449,6 @@ class UpdateManager throw new ApplicationException(Lang::get('system::lang.zip.extract_failed', ['file' => $filePath])); } - @unlink($filePath); - // Database may fall asleep after this long process Db::reconnect(); @@ -458,6 +456,8 @@ class UpdateManager 'system::core.hash' => $hash, 'system::core.build' => $build ]); + + @unlink($filePath); } //