summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-24 21:01:23 +0800
committerUnknwon <u@gogs.io>2015-08-24 21:01:23 +0800
commit87152f89ba313446fcf1c92ee40c404645c188f5 (patch)
tree007baed2e30555be8ae970e770f124beb8561086 /models/models.go
parent0b97290c07a0551a207b187432b014443e016237 (diff)
downloadgitea-87152f89ba313446fcf1c92ee40c404645c188f5.tar.gz
gitea-87152f89ba313446fcf1c92ee40c404645c188f5.zip
fix release created timezone issue
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index 7d02bb9565..c141391943 100644
--- a/models/models.go
+++ b/models/models.go
@@ -133,7 +133,9 @@ func getEngine() (*xorm.Engine, error) {
if !EnableSQLite3 {
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
}
- os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm)
+ if err := os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm); err != nil {
+ return nil, fmt.Errorf("Fail to create directories: %v", err)
+ }
cnnstr = "file:" + DbCfg.Path + "?cache=shared&mode=rwc"
default:
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)