diff --git a/frameworks/native/backup_ext/src/ext_extension.cpp b/frameworks/native/backup_ext/src/ext_extension.cpp index ec7f43d1432fceb2933666de7b25aa4be068be67..e7c3d19e8c2887e76c0f6a13ee42170b77b6ab73 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 fb11fea1bfe36231e5afd6cd5aab5da1ea8061b2..249800ac1ebcbc503c62f413b2bc0d0535ca3516 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); }