Set session and indexers' data files rel to AppDataPath (#2192)
* Set session and indexers' data files rel to AppDataPath The setting AppDataPath is now relative to the working directory. The session svc's PROVIDER_CONFIG now defaults to AppDataPath/data/sessions. The issue indexer's IssuePath now defaults to AppDataPath/indexers/issues.bleves. * fix bug
This commit is contained in:

committed by
Lauris BH

parent
95637e046f
commit
8798cf4e3b
@ -50,9 +50,9 @@ func setup(logPath string) error {
|
||||
models.LoadConfigs()
|
||||
|
||||
if setting.UseSQLite3 || setting.UseTiDB {
|
||||
workDir, _ := setting.WorkDir()
|
||||
if err := os.Chdir(workDir); err != nil {
|
||||
log.GitLogger.Fatal(4, "Failed to change directory %s: %v", workDir, err)
|
||||
workPath := setting.AppWorkPath
|
||||
if err := os.Chdir(workPath); err != nil {
|
||||
log.GitLogger.Fatal(4, "Failed to change directory %s: %v", workPath, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user