修复文件上传错误

This commit is contained in:
Minho
2017-06-05 13:55:07 +08:00
parent 95c63fb1fb
commit ff9f2a07b1
2 changed files with 3 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ func RegisterDataBase() {
if strings.HasPrefix(database,"./") {
database = filepath.Join(WorkingDirectory,string(database[1:]))
}
dbPath := filepath.Dir(database)
os.MkdirAll(dbPath, 0777)