|
|
@ -162,6 +162,7 @@ func (w *Watch) watchDir(dir string) { |
|
|
|
} |
|
|
|
return nil |
|
|
|
}) |
|
|
|
|
|
|
|
for _, v := range AddDirs { |
|
|
|
if v != "" && existPath(v) { |
|
|
|
//通过Walk来遍历目录下的所有子目录
|
|
|
@ -186,10 +187,7 @@ func (w *Watch) watchDir(dir string) { |
|
|
|
|
|
|
|
//for _, v := range AddDirs {
|
|
|
|
// if v != "" && existPath(v) {
|
|
|
|
// path, err := filepath.Abs(path)
|
|
|
|
// if err != nil && !isHidden(path) {
|
|
|
|
// w.watch.Add(path)
|
|
|
|
// }
|
|
|
|
// w.watch.Add(v)
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
|
|
|
|