reader: Do not append '/' to '/'

https://github.com/junegunn/fzf/pull/4334#issue-2966013714
This commit is contained in:
Junegunn Choi 2025-04-11 20:38:16 +09:00
parent 93cb3758b5
commit 9ffc2c7ca3
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -323,7 +323,9 @@ func (r *Reader) readFiles(roots []string, opts walkerOpts, ignores []string) bo
return filepath.SkipDir return filepath.SkipDir
} }
} }
path += sep if path != sep {
path += sep
}
} }
if ((opts.file && !isDir) || (opts.dir && isDir)) && r.pusher(stringBytes(path)) { if ((opts.file && !isDir) || (opts.dir && isDir)) && r.pusher(stringBytes(path)) {
atomic.StoreInt32(&r.event, int32(EvtReadNew)) atomic.StoreInt32(&r.event, int32(EvtReadNew))