summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dump.go5
-rw-r--r--cmd/serv.go6
2 files changed, 4 insertions, 7 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index 2f42bb8d6d..588a2175de 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -126,10 +126,7 @@ func runDump(ctx *cli.Context) error {
var sessionAbsPath string
if setting.SessionConfig.Provider == "file" {
- if len(setting.SessionConfig.ProviderConfig) == 0 {
- setting.SessionConfig.ProviderConfig = "data/sessions"
- }
- sessionAbsPath, _ = filepath.Abs(setting.SessionConfig.ProviderConfig)
+ sessionAbsPath = setting.SessionConfig.ProviderConfig
}
if err := zipAddDirectoryExclude(z, "data", setting.AppDataPath, sessionAbsPath); err != nil {
log.Fatalf("Failed to include data directory: %v", err)
diff --git a/cmd/serv.go b/cmd/serv.go
index 4e3b9de2f9..5dc3785852 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -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)
}
}