Skip to content

Commit 9ffc2c7

Browse files
committed
reader: Do not append '/' to '/'
#4334 (comment)
1 parent 93cb375 commit 9ffc2c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/reader.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ func (r *Reader) readFiles(roots []string, opts walkerOpts, ignores []string) bo
323323
return filepath.SkipDir
324324
}
325325
}
326-
path += sep
326+
if path != sep {
327+
path += sep
328+
}
327329
}
328330
if ((opts.file && !isDir) || (opts.dir && isDir)) && r.pusher(stringBytes(path)) {
329331
atomic.StoreInt32(&r.event, int32(EvtReadNew))

0 commit comments

Comments
 (0)