Skip to content

Commit

Permalink
Change sqlite DB path default to data directory (#6198)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolheiser authored and techknowlogick committed Feb 27, 2019
1 parent b03d780 commit 6cc11ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"net/url"
"os"
"path"
"path/filepath"
"strings"

"code.gitea.io/gitea/modules/log"
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 6cc11ec

Please sign in to comment.