mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:10:55 +00:00
fix(Template): correct check error
This commit is contained in:
parent
68b0bd98fd
commit
aa6d0f9f0b
2
fs.go
2
fs.go
@ -40,7 +40,7 @@ func walk(fs http.FileSystem, path string, info os.FileInfo, walkFn filepath.Wal
|
||||
|
||||
dir, err := fs.Open(path)
|
||||
defer dir.Close()
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
err1 := walkFn(path, info, err)
|
||||
if err1 != nil {
|
||||
return err1
|
||||
|
@ -206,7 +206,7 @@ func BuildTemplate(dir string, files ...string) error {
|
||||
return self.visit(path, f, err)
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Printf("filepath.Walk() returned %v\n", err)
|
||||
fmt.Printf("Walk() returned %v\n", err)
|
||||
return err
|
||||
}
|
||||
buildAllFiles := len(files) == 0
|
||||
|
Loading…
Reference in New Issue
Block a user