minor setting refactorings

This commit is contained in:
Torkel Ödegaard
2018-10-12 07:55:36 +02:00
parent c1fd4265a9
commit d5d8d7efa6
3 changed files with 37 additions and 30 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ func (ss *SqlStore) buildConnectionString() (string, error) {
case migrator.SQLITE:
// special case for tests
if !filepath.IsAbs(ss.dbCfg.Path) {
ss.dbCfg.Path = filepath.Join(setting.DataPath, ss.dbCfg.Path)
ss.dbCfg.Path = filepath.Join(ss.Cfg.DataPath, ss.dbCfg.Path)
}
os.MkdirAll(path.Dir(ss.dbCfg.Path), os.ModePerm)
cnnstr = "file:" + ss.dbCfg.Path + "?cache=shared&mode=rwc"