Don't skip worktree updates if unknown entries are removed
When rejoining a project, if entries were both created and deleted since joining the project, the guest will receive those entries ids in as removed.
This commit is contained in:
parent
661fba8640
commit
43a94cda5f
1 changed files with 4 additions and 5 deletions
|
@ -1227,11 +1227,10 @@ impl Snapshot {
|
|||
let mut entries_by_path_edits = Vec::new();
|
||||
let mut entries_by_id_edits = Vec::new();
|
||||
for entry_id in update.removed_entries {
|
||||
let entry = self
|
||||
.entry_for_id(ProjectEntryId::from_proto(entry_id))
|
||||
.ok_or_else(|| anyhow!("unknown entry {}", entry_id))?;
|
||||
entries_by_path_edits.push(Edit::Remove(PathKey(entry.path.clone())));
|
||||
entries_by_id_edits.push(Edit::Remove(entry.id));
|
||||
if let Some(entry) = self.entry_for_id(ProjectEntryId::from_proto(entry_id)) {
|
||||
entries_by_path_edits.push(Edit::Remove(PathKey(entry.path.clone())));
|
||||
entries_by_id_edits.push(Edit::Remove(entry.id));
|
||||
}
|
||||
}
|
||||
|
||||
for entry in update.updated_entries {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue