Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed May 26, 2020
1 parent 02544ec commit 06897f5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/file/watch/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ func WithDirs(dirs ...string) Option {
if len(dirs) == 0 {
return nil
}
if w.dirs != nil {
w.dirs = append(w.dirs, dirs...)
} else {
w.dirs = dirs
for _, dir := range dirs {
w.dirs[dir] = struct{}{}
}
return nil
}
Expand Down

0 comments on commit 06897f5

Please sign in to comment.