Skip to content
Myr

Fix --type: skip if file type is unknown

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by J.W · committed by David Peter · parent 1ec204c · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:src/walk.rs+3 added-3 removed
159 unmodified lines
160 // Filter out unwanted file types.161 match config.file_type {162 FileType::Any => (),163 FileType::RegularFile => {164 if entry.file_type().map_or(false, |ft| !ft.is_file()) {164 if entry.file_type().map_or(true, |ft| !ft.is_file()) {165 return ignore::WalkState::Continue;166 }167 }168 FileType::Directory => {169 if entry.file_type().map_or(false, |ft| !ft.is_dir()) {169 if entry.file_type().map_or(true, |ft| !ft.is_dir()) {170 return ignore::WalkState::Continue;171 }172 }173 FileType::SymLink => {174 if entry.file_type().map_or(false, |ft| !ft.is_symlink()) {174 if entry.file_type().map_or(true, |ft| !ft.is_symlink()) {175 return ignore::WalkState::Continue;176 }177 }178 }
38 unmodified lines