diff --git a/tools/backup_tool/src/tools_op_incremental_restore.cpp b/tools/backup_tool/src/tools_op_incremental_restore.cpp index ab635a44d0f9a409cad234e7ff0ce3d60c8a5835..703a922ed9533df8164ebf3fde12275128e5ed44 100644 --- a/tools/backup_tool/src/tools_op_incremental_restore.cpp +++ b/tools/backup_tool/src/tools_op_incremental_restore.cpp @@ -209,7 +209,9 @@ static void RestoreApp(shared_ptr restore) string path = string(BConstants::BACKUP_TOOL_INCREMENTAL_RECEIVE_DIR) + data.bundleName + "/" + to_string(data.lastIncrementalTime) + string(BConstants::BACKUP_TOOL_INCREMENTAL); if (access(path.data(), F_OK) != 0) { - throw BError(BError::Codes::TOOL_INVAL_ARG, generic_category().message(errno)); + HILOGE("bundleName tar does not exist, file %{public}s errno : %{public}d", + path.c_str(), errno); + continue; } const auto [err, filePaths] = BDir::GetDirFiles(path); if (err != 0) { diff --git a/tools/backup_tool/src/tools_op_incremental_restore_async.cpp b/tools/backup_tool/src/tools_op_incremental_restore_async.cpp index fe9628ac98c74af8721a31f3f07cded4b8f6bca4..8b52144b8c86c6ee7f85fd7da860050c07238da0 100644 --- a/tools/backup_tool/src/tools_op_incremental_restore_async.cpp +++ b/tools/backup_tool/src/tools_op_incremental_restore_async.cpp @@ -222,7 +222,9 @@ static void RestoreApp(shared_ptr restore, vector restore, vector &bundleNa } string path = string(BConstants::BACKUP_TOOL_RECEIVE_DIR) + bundleName; if (access(path.data(), F_OK) != 0) { - throw BError(BError::Codes::TOOL_INVAL_ARG, generic_category().message(errno)); + HILOGE("bundleName tar does not exist, file %{public}s errno : %{public}d", + path.c_str(), errno); + continue; } const auto [err, filePaths] = BDir::GetDirFiles(path); if (err != 0) { diff --git a/tools/backup_tool/src/tools_op_restore_async.cpp b/tools/backup_tool/src/tools_op_restore_async.cpp index 47ab6b8d4a64f689f66137dd9f9ed61373d32e7e..0be93a066383b655c31726264baec291e3063fcc 100644 --- a/tools/backup_tool/src/tools_op_restore_async.cpp +++ b/tools/backup_tool/src/tools_op_restore_async.cpp @@ -216,7 +216,9 @@ static void RestoreApp(shared_ptr restore, vector &bun } string path = string(BConstants::BACKUP_TOOL_RECEIVE_DIR) + bundleName; if (access(path.data(), F_OK) != 0) { - throw BError(BError::Codes::TOOL_INVAL_ARG, generic_category().message(errno)); + HILOGE("bundleName tar does not exist, file %{public}s errno : %{public}d", + path.c_str(), errno); + continue; } // update manage.json and fileName