mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-19 02:10:34 +01:00
Skip fifos, sockets, .. when using --type f/d/l
This commit is contained in:
parent
ffd49c60bd
commit
5397787824
1 changed files with 5 additions and 0 deletions
|
@ -203,6 +203,11 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<FdOptions>) {
|
|||
|| (entry_type.is_symlink() && !file_types.symlinks)
|
||||
{
|
||||
return ignore::WalkState::Continue;
|
||||
} else if !(entry_type.is_file() || entry_type.is_dir()
|
||||
|| entry_type.is_symlink())
|
||||
{
|
||||
// This is probably a block device, char device, fifo or socket. Skip it.
|
||||
return ignore::WalkState::Continue;
|
||||
}
|
||||
} else {
|
||||
return ignore::WalkState::Continue;
|
||||
|
|
Loading…
Reference in a new issue