Browse Source

directory.go: fix os.MkdirAll return error

main
黄笑 3 years ago
parent
commit
d110216663
  1. 4
      server/utils/directory.go

4
server/utils/directory.go

@ -37,9 +37,9 @@ func CreateDir(dirs ...string) (err error) {
}
if !exist {
global.GVA_LOG.Debug("create directory" + v)
err = os.MkdirAll(v, os.ModePerm)
if err != nil {
if err := os.MkdirAll(v, os.ModePerm); err != nil {
global.GVA_LOG.Error("create directory"+v, zap.Any(" error:", err))
return err
}
}
}

Loading…
Cancel
Save