From c75b7a00d9f184f8a4a6153aa287c5d588a29307 Mon Sep 17 00:00:00 2001 From: chenxi0605 Date: Thu, 7 Aug 2025 20:32:33 +0800 Subject: [PATCH] while clear flag is true also need remove tar Signed-off-by: chenxi0605 --- frameworks/native/backup_ext/src/ext_extension.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frameworks/native/backup_ext/src/ext_extension.cpp b/frameworks/native/backup_ext/src/ext_extension.cpp index ec7f43d14..c12bd3990 100644 --- a/frameworks/native/backup_ext/src/ext_extension.cpp +++ b/frameworks/native/backup_ext/src/ext_extension.cpp @@ -930,10 +930,6 @@ int BackupExtExtension::DoRestore(const string &fileName, const off_t fileSize) return ret; } HILOGI("Application recovered successfully, package path is %{public}s", tarName.c_str()); - if (!isClearData_) { - HILOGI("configured not clear data"); - return ERR_OK; - } if (!RemoveFile(tarName)) { HILOGE("Failed to delete the backup tar %{public}s", tarName.c_str()); } @@ -1478,10 +1474,6 @@ void BackupExtExtension::DeleteBackupIncrementalIdxFile() void BackupExtExtension::DeleteBackupIncrementalTars(const string &tarName) { - if (!isClearData_) { - HILOGI("configured not need clear data"); - return; - } if (!RemoveFile(tarName)) { HILOGE("Failed to delete the backup tar %{private}s, err = %{public}d", tarName.c_str(), errno); } -- Gitee