Skip to content

Commit

Permalink
By not counting directories, we get the correct amount of bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thiel committed Jun 1, 2019
1 parent 61ca52a commit a19e3d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ mod aggregate {
match entry {
Ok(entry) => {
num_bytes += match entry.metadata {
Some(Ok(m)) => m.len(),
Some(Ok(ref m)) if !m.is_dir() => m.len(),
Some(Ok(_)) => 0,
Some(Err(_)) => {
res.num_errors += 1;
0
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/success-no-arguments
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1259683 .
1258947 .

0 comments on commit a19e3d7

Please sign in to comment.