Skip to content

Commit

Permalink
fix: If the localFileMap is empty, do not continue execution(OpenAtom…
Browse files Browse the repository at this point in the history
  • Loading branch information
chengyu-l and liuchengyu authored Jan 13, 2024
1 parent ba1ff7a commit 273651d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rsync_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ Status RsyncClient::CleanUpExpiredFiles(bool need_reset_path, const std::set<std

Status RsyncClient::UpdateLocalMeta(const std::string& snapshot_uuid, const std::set<std::string>& expired_files,
std::map<std::string, std::string>* localFileMap) {
if (localFileMap->empty()) {
return Status::OK();
}

for (const auto& item : expired_files) {
localFileMap->erase(item);
}
Expand Down

0 comments on commit 273651d

Please sign in to comment.