Skip dotfiles when generating assets

This commit is contained in:
Jakob Borg 2014-12-06 13:46:02 +01:00
parent c7e779107c
commit c6041d2590

View File

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