summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-04-11 20:38:16 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-04-11 20:38:16 +0900
commit9ffc2c7ca37098a7de69cab3e2479c839e7543bf (patch)
treec7a0cd8e365229dde442d8a6cdad7dec15d2a1e1 /src
parent93cb3758b5f08a6dbf30c6e3d2e1de9b0be52a63 (diff)
downloadfzf-9ffc2c7ca37098a7de69cab3e2479c839e7543bf.tar.gz
reader: Do not append '/' to '/'
https://github.com/junegunn/fzf/pull/4334#issue-2966013714
Diffstat (limited to 'src')
-rw-r--r--src/reader.go4
1 files changed, 3 insertions, 1 deletions
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))