From b9abcb3b61592ad371a0f2478cd3caf729740d60 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 5 Dec 2017 06:06:04 +0800 Subject: [PATCH] fix redis cache failed (#3086) (#3089) --- modules/setting/setting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index d90776eb8..032497570 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -1392,7 +1392,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")