Skip to content

Commit

Permalink
don't prune removed nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
solidiquis committed Dec 2, 2023
1 parent f55bd00 commit 573838b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/file/tree/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ impl Tree {
while pruning {
let mut to_remove = vec![];

for n in self.root_id.descendants(&self.arena) {
if self.arena[n].get().is_dir() && n.children(&self.arena).count() == 0 {
for n in self.root_id.descendants(&self.arena).skip(1) {
if !n.is_removed(&self.arena) && self.arena[n].get().is_dir() && n.children(&self.arena).count() == 0 {
to_remove.push(n);
}
}
Expand Down Expand Up @@ -168,6 +168,7 @@ impl Tree {
Ok(())
}

/// Filtering via globbing
fn filter_glob(&mut self, ctx: &Context) -> Result<()> {
let Context {
globbing: Globbing { iglob, .. },
Expand Down

0 comments on commit 573838b

Please sign in to comment.