diff options
author | Guillaume Dube <guillaume.dube.girard@gmail.com> | 2017-11-03 04:56:20 -0400 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-11-03 10:56:20 +0200 |
commit | 8798cf4e3ba30bc0bdea073bf273ac27b71b78ce (patch) | |
tree | 3dd0c3cc8c9448d1be0211a15b5c4094181fabed /cmd/dump.go | |
parent | 95637e046f4cca1ce6adc0eb7e03548034dedeac (diff) | |
download | gitea-8798cf4e3ba30bc0bdea073bf273ac27b71b78ce.tar.gz gitea-8798cf4e3ba30bc0bdea073bf273ac27b71b78ce.zip |
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
Diffstat (limited to 'cmd/dump.go')
-rw-r--r-- | cmd/dump.go | 5 |
1 files changed, 1 insertions, 4 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) |