diff options
author | Canop <cano.petrole@gmail.com> | 2019-01-08 17:59:02 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2019-01-08 17:59:02 +0100 |
commit | 1132b642184b760bdf3363ef2d366ceebe8455b4 (patch) | |
tree | b7cbf8b977cfde1193c42c1a20635cf71b19290f | |
parent | 10c869fc38e44040c35cf1f6f227487ddffc3af3 (diff) |
faster directory size computation
-rw-r--r-- | src/file_sizes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_sizes.rs b/src/file_sizes.rs index 40051e9..e876d67 100644 --- a/src/file_sizes.rs +++ b/src/file_sizes.rs @@ -43,8 +43,8 @@ impl Size { if let Ok(entries) = fs::read_dir(&open_dir) { for e in entries { if let Ok(e) = e { - let p = e.path(); - if let Ok(md) = fs::symlink_metadata(&p) { + if let Ok(md) = e.metadata() { + let p = e.path(); if md.is_dir() { dirs.push(p); } else if md.nlink() > 1 { |