mirror of
https://github.com/sharkdp/fd
synced 2024-11-05 16:58:21 +00:00
Fix search with hidden root path
This commit is contained in:
parent
9bf008b319
commit
bb63a4c6d7
1 changed files with 3 additions and 1 deletions
|
@ -106,7 +106,9 @@ fn scan(root: &Path, pattern: &Regex, config: &FdOptions) {
|
|||
.follow_links(config.follow_links)
|
||||
.max_depth(config.max_depth)
|
||||
.into_iter()
|
||||
.filter_entry(|e| config.search_hidden || !is_hidden(e))
|
||||
.filter_entry(|e| config.search_hidden
|
||||
|| !is_hidden(e)
|
||||
|| e.path() == root)
|
||||
.filter_map(|e| e.ok())
|
||||
.filter(|e| e.path() != root);
|
||||
|
||||
|
|
Loading…
Reference in a new issue