mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
Change sqlite DB path default to data directory (#6198)
This commit is contained in:
parent
b03d780ccb
commit
6cc11eccac
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.gitea.io/gitea/modules/log"
|
"code.gitea.io/gitea/modules/log"
|
||||||
|
@ -155,7 +156,7 @@ func LoadConfigs() {
|
||||||
DbCfg.Passwd = sec.Key("PASSWD").String()
|
DbCfg.Passwd = sec.Key("PASSWD").String()
|
||||||
}
|
}
|
||||||
DbCfg.SSLMode = sec.Key("SSL_MODE").MustString("disable")
|
DbCfg.SSLMode = sec.Key("SSL_MODE").MustString("disable")
|
||||||
DbCfg.Path = sec.Key("PATH").MustString("data/gitea.db")
|
DbCfg.Path = sec.Key("PATH").MustString(filepath.Join(setting.AppDataPath, "gitea.db"))
|
||||||
DbCfg.Timeout = sec.Key("SQLITE_TIMEOUT").MustInt(500)
|
DbCfg.Timeout = sec.Key("SQLITE_TIMEOUT").MustInt(500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue