Skip to content
Snippets Groups Projects
Unverified Commit c39113ee authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[windows] Do not include directories in the list

Fix #1926
parent 14f90502
No related branches found
No related tags found
No related merge requests found
......@@ -156,10 +156,11 @@ func (r *Reader) readFiles() bool {
fn := func(path string, mode os.FileInfo) error {
path = filepath.Clean(path)
if path != "." {
if mode.Mode().IsDir() && filepath.Base(path)[0] == '.' {
isDir := mode.Mode().IsDir()
if isDir && filepath.Base(path)[0] == '.' {
return filepath.SkipDir
}
if r.pusher([]byte(path)) {
if !isDir && r.pusher([]byte(path)) {
atomic.StoreInt32(&r.event, int32(EvtReadNew))
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment