Browse Source

Skip dotfiles when generating assets

Jakob Borg 11 years ago
parent
commit
c6041d2590
1 changed files with 6 additions and 0 deletions
  1. 6 0
      cmd/genassets/main.go

+ 6 - 0
cmd/genassets/main.go

@@ -26,6 +26,7 @@ import (
 	"io"
 	"os"
 	"path/filepath"
+	"strings"
 	"text/template"
 )
 
@@ -65,6 +66,11 @@ func walkerFor(basePath string) filepath.WalkFunc {
 			return err
 		}
 
+		if strings.HasPrefix(filepath.Base(name), ".") {
+			// Skip dotfiles
+			return nil
+		}
+
 		if info.Mode().IsRegular() {
 			fd, err := os.Open(name)
 			if err != nil {