Skip to content
Myr

Skip fifos, sockets, .. when using --type f/d/l

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

authored by sharkdp · committed by David Peter · parent ffd49c6 · Browse files · 1 file+5 added−0 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:src/walk.rs+5 added
201 unmodified lines
202 || (entry_type.is_dir() && !file_types.directories)203 || (entry_type.is_symlink() && !file_types.symlinks)204 {205 return ignore::WalkState::Continue;206 } else if !(entry_type.is_file() || entry_type.is_dir()207 || entry_type.is_symlink())208 {209 // This is probably a block device, char device, fifo or socket. Skip it.210 return ignore::WalkState::Continue;211 }212 } else {213 return ignore::WalkState::Continue;214 }
46 unmodified lines