mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 10:48:00 +08:00
修复sqlite数据库位置
This commit is contained in:
@@ -54,6 +54,9 @@ func RegisterDataBase() {
|
||||
}
|
||||
} else if adapter == "sqlite3" {
|
||||
database := beego.AppConfig.String("db_database")
|
||||
if strings.HasPrefix(database,"./") {
|
||||
database = filepath.Join(WorkingDirectory,string(database[1:]))
|
||||
}
|
||||
dbPath := filepath.Dir(database)
|
||||
os.MkdirAll(dbPath, 0777)
|
||||
|
||||
|
Reference in New Issue
Block a user