Skip to content

Commit

Permalink
fix: only return the id if it is completely removed in update_one
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <[email protected]>
  • Loading branch information
tareknaser committed Oct 29, 2024
1 parent 94bcd25 commit 6122365
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs-index/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,8 @@ impl<Id: ResourceId> ResourceIndex<Id> {
// If the ID has no paths, remove it from the ID to paths map
if self.id_to_paths[&id.item].is_empty() {
self.id_to_paths.remove(&id.item);
result.removed.insert(id.item);
}

result.removed.insert(id.item);
log::trace!("Resource removed: {:?}", path);
} else {
// If the entry exists in the file system, it's an addition or
Expand Down

0 comments on commit 6122365

Please sign in to comment.