From a8d0cfd61b45ad293afae3d5be6f14185fba88d4 Mon Sep 17 00:00:00 2001 From: the_big_blue_devil Date: Thu, 10 Apr 2025 22:04:50 +0800 Subject: [PATCH 1/3] Signed-off-by:hanqiaosheng --- services/include/updater/updater_const.h | 1 + 1 file changed, 1 insertion(+) diff --git a/services/include/updater/updater_const.h b/services/include/updater/updater_const.h index 6d289679..dff942f7 100644 --- a/services/include/updater/updater_const.h +++ b/services/include/updater/updater_const.h @@ -19,6 +19,7 @@ namespace Updater { constexpr const char *INSTALL_TIME_FILE = "install_time"; +constexpr const char *ROLLBACK_FILE = "rollback"; constexpr const char *COMMAND_FILE = "/data/updater/command"; constexpr const char *TMP_LOG = "/tmp/updater.log"; constexpr const char *TMP_STAGE_LOG = "/tmp/updater_stage.log"; -- Gitee From 17e4044eabb0d55a8a5355d4d20186f1b8a2c3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=93=9D=E8=89=B2=E5=A4=A7=E9=AD=94=E7=8E=8B?= Date: Thu, 10 Apr 2025 14:08:17 +0000 Subject: [PATCH 2/3] update services/updater_utils.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蓝色大魔王 --- services/updater_utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/updater_utils.cpp b/services/updater_utils.cpp index 6c7c0983..511db702 100755 --- a/services/updater_utils.cpp +++ b/services/updater_utils.cpp @@ -108,7 +108,8 @@ bool DeleteUpdaterPath(const std::string &path) (currentName.compare(UPDATER_LOCALE_FILE) == 0) || (currentName.compare(MODULE_UPDATE_RESULT_FILE) == 0) || (currentName.compare(UPLOAD_LOG_TIME_FILE) == 0) || - (currentName.compare(INSTALL_TIME_FILE) == 0)) { + (currentName.compare(INSTALL_TIME_FILE) == 0) || + ((currentName.compare(ROLLBACK_FILE) == 0))) { continue; } if (sdcardTmp && currentName.find(SDCARD_PACKAGE_SUFFIX) != std::string::npos) { -- Gitee From 4a7a96d25e08a157d4ef249bc98ca78b19eef476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=93=9D=E8=89=B2=E5=A4=A7=E9=AD=94=E7=8E=8B?= Date: Thu, 10 Apr 2025 14:09:20 +0000 Subject: [PATCH 3/3] update services/updater_utils.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蓝色大魔王 --- services/updater_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/updater_utils.cpp b/services/updater_utils.cpp index 511db702..65995a27 100755 --- a/services/updater_utils.cpp +++ b/services/updater_utils.cpp @@ -109,7 +109,7 @@ bool DeleteUpdaterPath(const std::string &path) (currentName.compare(MODULE_UPDATE_RESULT_FILE) == 0) || (currentName.compare(UPLOAD_LOG_TIME_FILE) == 0) || (currentName.compare(INSTALL_TIME_FILE) == 0) || - ((currentName.compare(ROLLBACK_FILE) == 0))) { + (currentName.compare(ROLLBACK_FILE) == 0)) { continue; } if (sdcardTmp && currentName.find(SDCARD_PACKAGE_SUFFIX) != std::string::npos) { -- Gitee