diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-02-27 10:55:08 -0600 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-27 11:55:08 -0500 |
commit | 6cc11eccac3f802a1d539454e9785258065ae534 (patch) | |
tree | 10e26a75a9fc55f231142f681656d23e910e9b97 /models/models.go | |
parent | b03d780ccb9e7c1926c13b88180512b491858d48 (diff) | |
download | gitea-6cc11eccac3f802a1d539454e9785258065ae534.tar.gz gitea-6cc11eccac3f802a1d539454e9785258065ae534.zip |
Change sqlite DB path default to data directory (#6198)
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go index b8fe588b5a..faa363e835 100644 --- a/models/models.go +++ b/models/models.go @@ -12,6 +12,7 @@ import ( "net/url" "os" "path" + "path/filepath" "strings" "code.gitea.io/gitea/modules/log" @@ -155,7 +156,7 @@ func LoadConfigs() { DbCfg.Passwd = sec.Key("PASSWD").String() } 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) } |