mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-01 12:42:01 -07:00
walker: Do not treat '..' as a hidden entry
Thanks to @LangLangBart for the suggested fix Fix #4048
This commit is contained in:
@@ -265,7 +265,7 @@ func (r *Reader) readFiles(root string, opts walkerOpts, ignores []string) bool
|
|||||||
isDir := de.IsDir()
|
isDir := de.IsDir()
|
||||||
if isDir || opts.follow && isSymlinkToDir(path, de) {
|
if isDir || opts.follow && isSymlinkToDir(path, de) {
|
||||||
base := filepath.Base(path)
|
base := filepath.Base(path)
|
||||||
if !opts.hidden && base[0] == '.' {
|
if !opts.hidden && base[0] == '.' && base != ".." {
|
||||||
return filepath.SkipDir
|
return filepath.SkipDir
|
||||||
}
|
}
|
||||||
for _, ignore := range ignores {
|
for _, ignore := range ignores {
|
||||||
|
Reference in New Issue
Block a user