From 9ffc2c7ca37098a7de69cab3e2479c839e7543bf Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 11 Apr 2025 20:38:16 +0900 Subject: [PATCH] reader: Do not append '/' to '/' https://github.com/junegunn/fzf/pull/4334#issue-2966013714 --- src/reader.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/reader.go b/src/reader.go index a71f9697..7dc18ac3 100644 --- a/src/reader.go +++ b/src/reader.go @@ -323,7 +323,9 @@ func (r *Reader) readFiles(roots []string, opts walkerOpts, ignores []string) bo return filepath.SkipDir } } - path += sep + if path != sep { + path += sep + } } if ((opts.file && !isDir) || (opts.dir && isDir)) && r.pusher(stringBytes(path)) { atomic.StoreInt32(&r.event, int32(EvtReadNew))