mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Skip dotfiles when generating assets
This commit is contained in:
parent
c7e779107c
commit
c6041d2590
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user