diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-12-04 23:00:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 23:00:14 +0800 |
commit | 2738effddfed688bcf3997423034d7794fb30631 (patch) | |
tree | ccef2f8f13f405b95394aa174287af9b63c56197 /modules/setting | |
parent | 0332b8fb1866a7fd596f7b8544fb5339db913ca0 (diff) | |
download | gitea-2738effddfed688bcf3997423034d7794fb30631.tar.gz gitea-2738effddfed688bcf3997423034d7794fb30631.zip |
fix redis cache failed (#3086)
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 1eedfc1c93..46ef20f61e 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -1399,7 +1399,7 @@ func newSessionService() { SessionConfig.Provider = Cfg.Section("session").Key("PROVIDER").In("memory", []string{"memory", "file", "redis", "mysql"}) SessionConfig.ProviderConfig = strings.Trim(Cfg.Section("session").Key("PROVIDER_CONFIG").MustString(path.Join(AppDataPath, "sessions")), "\" ") - if !filepath.IsAbs(SessionConfig.ProviderConfig) { + if SessionConfig.Provider == "file" && !filepath.IsAbs(SessionConfig.ProviderConfig) { SessionConfig.ProviderConfig = path.Join(AppWorkPath, SessionConfig.ProviderConfig) } SessionConfig.CookieName = Cfg.Section("session").Key("COOKIE_NAME").MustString("i_like_gitea") |