Skip to content

Commit

Permalink
🐛 fix total size loop when using with -a
Browse files Browse the repository at this point in the history
  • Loading branch information
zwpaper committed Sep 28, 2024
1 parent 5b104dc commit d9faf5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/meta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ impl Meta {
None => 0,
};
for x in &mut metas.iter_mut() {
// must not count the size of '.' and '..', or will be infinite loop
if x.name.name == "." || x.name.name == ".." {
continue;
}

x.calculate_total_size();
size_accumulated += match &x.size {
Some(size) => size.get_bytes(),
Expand Down

0 comments on commit d9faf5a

Please sign in to comment.