summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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))