walk path fixed #12

This commit is contained in:
alessio 2016-08-24 14:17:42 +02:00
parent 74e540bdbf
commit 4aa4d27bb5

View File

@ -185,6 +185,7 @@ func (p *Project) walks(watcher *fsnotify.Watcher) {
wd, _ := os.Getwd()
walk := func(path string, info os.FileInfo, err error) error {
if !p.ignore(path) {
if (info.IsDir() && len(filepath.Ext(path)) == 0 && !strings.HasPrefix(path, ".")) && !strings.Contains(path, "/.") || (inArray(filepath.Ext(path), p.Watcher.Exts)) {
if p.Watcher.Preview {
@ -199,6 +200,7 @@ func (p *Project) walks(watcher *fsnotify.Watcher) {
folders++
}
}
}
return nil
}