From 6e172666f3162e28b9ed566dfa9ab89cb6fc5016 Mon Sep 17 00:00:00 2001 From: lizhengxing Date: Thu, 7 Aug 2025 19:30:13 +0800 Subject: [PATCH] mkdir before dopacket Signed-off-by: lizhengxing --- frameworks/native/backup_ext/src/ext_extension.cpp | 2 ++ frameworks/native/backup_ext/src/sub_ext_extension.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/frameworks/native/backup_ext/src/ext_extension.cpp b/frameworks/native/backup_ext/src/ext_extension.cpp index ec7f43d14..e7c3d19e8 100644 --- a/frameworks/native/backup_ext/src/ext_extension.cpp +++ b/frameworks/native/backup_ext/src/ext_extension.cpp @@ -1067,9 +1067,11 @@ void BackupExtExtension::AsyncTaskBackup(const string config) ptr->DoBackUpTask(config); } catch (const BError &e) { HILOGE("extension: AsyncTaskBackup error, err code:%{public}d", e.GetCode()); + ScanFileSingleton::GetInstance().SetCompeletedFlag(false); ptr->AppDone(e.GetCode()); } catch (...) { HILOGE("Failed to restore the ext bundle"); + ScanFileSingleton::GetInstance().SetCompeletedFlag(false); ptr->AppDone(BError(BError::Codes::EXT_INVAL_ARG).GetCode()); } ptr->DoClear(); diff --git a/frameworks/native/backup_ext/src/sub_ext_extension.cpp b/frameworks/native/backup_ext/src/sub_ext_extension.cpp index fb11fea1b..249800ac1 100644 --- a/frameworks/native/backup_ext/src/sub_ext_extension.cpp +++ b/frameworks/native/backup_ext/src/sub_ext_extension.cpp @@ -1615,6 +1615,7 @@ void BackupExtExtension::DoBackUpTask(const string &config) ret = DoBackup(bigFileInfo, fileBackupedInfo, smallFiles, includeSize, excludeSize); DoBackupEnd(); + ScanFileSingleton::GetInstance().SetCompeletedFlag(false); AppDone(ret); HILOGI("backup app done %{public}d", ret); } -- Gitee