diff --git a/services/backup_sa/src/module_ipc/sub_service.cpp b/services/backup_sa/src/module_ipc/sub_service.cpp index de1d44c841f3b90edc31cc07dd9d51b9462a89d1..06e0bb232aa80f20e6d19b18c39c526427fb3e12 100644 --- a/services/backup_sa/src/module_ipc/sub_service.cpp +++ b/services/backup_sa/src/module_ipc/sub_service.cpp @@ -1099,7 +1099,12 @@ ErrCode Service::GetBackupDataSize(bool isPreciseScan, const std::vectorDecreaseSessionCnt(__PRETTY_FUNCTION__); return BError(BError::Codes::SA_INVAL_ARG, "verify caller failed"); } + const int userId = GetUserIdDefault(); + BundleMgrAdapter::CreatBackupEnv(bundleNameList, userId); CyclicSendScannedInfo(isPreciseScan, bundleNameList); + for (const auto &bundleIncrementalData : bundleNameList) { + ClearIncrementalStatFile(userId, bundleIncrementalData.bundleName); + } return BError(BError::Codes::OK); } catch (...) { session_->DecreaseSessionCnt(__PRETTY_FUNCTION__); diff --git a/tests/unittests/backup_sa/module_ipc/service_other_test.cpp b/tests/unittests/backup_sa/module_ipc/service_other_test.cpp index 5cace8b41a7bbf5b5ce02fb5b1ff18e46566633d..abea3602342a2dcc613a5db9e99a8106a5cc4731 100644 --- a/tests/unittests/backup_sa/module_ipc/service_other_test.cpp +++ b/tests/unittests/backup_sa/module_ipc/service_other_test.cpp @@ -171,6 +171,8 @@ void Service::RemoveExtensionMutex(const BundleName&) {} void Service::CreateDirIfNotExist(const std::string&) {} void SvcSessionManager::UpdateDfxInfo(const std::string &bundleName, uint64_t uniqId) {} + +void Service::ClearIncrementalStatFile(int32_t userId, const string &bundleName) {} } class BThreadPool {