From d05e7171d4e2f8feb7d5402026b02aa67a9f9b91 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 28 Feb 2020 18:42:35 +0100 Subject: [PATCH] Fix for older versions of Rust --- src/walk.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/walk.rs b/src/walk.rs index ff399b7dd..11969307f 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -303,7 +303,7 @@ fn spawn_senders( } let entry = match entry_o { - Ok(e) if e.depth() == 0 => { + Ok(ref e) if e.depth() == 0 => { // Skip the root directory entry. return ignore::WalkState::Continue; } @@ -316,6 +316,7 @@ fn spawn_senders( if io_error.kind() == io::ErrorKind::NotFound && path .symlink_metadata() + .ok() .map_or(false, |m| m.file_type().is_symlink()) => { DirEntry::BrokenSymlink(path.to_owned())