From d65c6101a84628b49f1e666977a8b62179f7276e Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 25 Oct 2024 13:50:15 +0900 Subject: [PATCH] walker: Do not treat '..' as a hidden entry Thanks to @LangLangBart for the suggested fix Fix #4048 --- src/reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.go b/src/reader.go index ecdf509c6d9..572c9c6294c 100644 --- a/src/reader.go +++ b/src/reader.go @@ -265,7 +265,7 @@ func (r *Reader) readFiles(root string, opts walkerOpts, ignores []string) bool isDir := de.IsDir() if isDir || opts.follow && isSymlinkToDir(path, de) { base := filepath.Base(path) - if !opts.hidden && base[0] == '.' { + if !opts.hidden && base[0] == '.' && base != ".." { return filepath.SkipDir } for _, ignore := range ignores {