diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-01 11:30:43 +0530 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-01 11:30:59 +0530 |
commit | a19e3d76fe559f59be467b4967156509e6f26715 (patch) | |
tree | 4107c18b14d6ec63c5470a05957270f488d4c05c /src | |
parent | 61ca52a2a8b23daffc3eea1fe8d71078e757a0d3 (diff) |
By not counting directories, we get the correct amount of bytes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |