From e38b7d7bff5faf6508e3ede7fa9d54dc9d7f4f33 Mon Sep 17 00:00:00 2001 From: "J.W" Date: Mon, 23 Oct 2017 23:47:45 +0800 Subject: [PATCH] Fix --type: skip if file type is unknown --- src/walk.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/walk.rs b/src/walk.rs index 3a399e8..bf6fe0c 100644 --- a/src/walk.rs +++ b/src/walk.rs @@ -161,17 +161,17 @@ pub fn scan(root: &Path, pattern: Arc, config: Arc) { match config.file_type { FileType::Any => (), FileType::RegularFile => { - if entry.file_type().map_or(false, |ft| !ft.is_file()) { + if entry.file_type().map_or(true, |ft| !ft.is_file()) { return ignore::WalkState::Continue; } } FileType::Directory => { - if entry.file_type().map_or(false, |ft| !ft.is_dir()) { + if entry.file_type().map_or(true, |ft| !ft.is_dir()) { return ignore::WalkState::Continue; } } FileType::SymLink => { - if entry.file_type().map_or(false, |ft| !ft.is_symlink()) { + if entry.file_type().map_or(true, |ft| !ft.is_symlink()) { return ignore::WalkState::Continue; } }