mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-26 14:42:15 +00:00
parent
18d69d7f8c
commit
72ecd0cdc7
1 changed files with 6 additions and 0 deletions
|
@ -343,12 +343,18 @@ func copyStatic() error {
|
|||
func getDirList() []string {
|
||||
var a []string
|
||||
dataDir := helpers.AbsPathify(viper.GetString("DataDir"))
|
||||
layoutDir := helpers.AbsPathify(viper.GetString("LayoutDir"))
|
||||
walker := func(path string, fi os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
if path == dataDir && os.IsNotExist(err) {
|
||||
jww.WARN.Println("Skip DataDir:", err)
|
||||
return nil
|
||||
|
||||
}
|
||||
if path == layoutDir && os.IsNotExist(err) {
|
||||
jww.WARN.Println("Skip LayoutDir:", err)
|
||||
return nil
|
||||
|
||||
}
|
||||
jww.ERROR.Println("Walker: ", err)
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue