summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 11:30:43 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 11:30:59 +0530
commita19e3d76fe559f59be467b4967156509e6f26715 (patch)
tree4107c18b14d6ec63c5470a05957270f488d4c05c /src/lib.rs
parent61ca52a2a8b23daffc3eea1fe8d71078e757a0d3 (diff)
By not counting directories, we get the correct amount of bytes
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 3535952..ca84134 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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