Skip to content

Commit

Permalink
skip directories starting with .
Browse files Browse the repository at this point in the history
  • Loading branch information
akupila committed Sep 28, 2016
1 parent 5db88ed commit ecb8d64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/server/watch/imperative_shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"
)

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -33,6 +34,10 @@ func YieldFileSystemItems(root string, excludedDirs []string) chan *FileSystemIt
return filepath.SkipDir
}

if info.IsDir() && strings.HasPrefix(info.Name(), ".") {
return filepath.SkipDir
}

basePath := filepath.Base(path)
for _, item := range excludedDirs {
if item == basePath && info.IsDir() && item != "" && basePath != "" {
Expand Down

0 comments on commit ecb8d64

Please sign in to comment.