Skip to content
Myr

[windows] Do not include directories in the list

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #1926

authored by Junegunn Choi · committed by Junegunn Choi · parent 14f9050 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:src/reader.go+3 added-2 removed
154 unmodified lines
155 r.killed = false156 fn := func(path string, mode os.FileInfo) error {157 path = filepath.Clean(path)158 if path != "." {159 isDir := mode.Mode().IsDir()159 if mode.Mode().IsDir() && filepath.Base(path)[0] == '.' {160 if isDir && filepath.Base(path)[0] == '.' {161 return filepath.SkipDir162 }162 if r.pusher([]byte(path)) {163 if !isDir && r.pusher([]byte(path)) {164 atomic.StoreInt32(&r.event, int32(EvtReadNew))165 }166 }167 r.mutex.Lock()
34 unmodified lines