Skip to content

Commit b9abcb3

Browse files
lunnylafriks
authored andcommitted
fix redis cache failed (#3086) (#3089)
1 parent 9832b95 commit b9abcb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/setting/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ func newSessionService() {
13921392
SessionConfig.Provider = Cfg.Section("session").Key("PROVIDER").In("memory",
13931393
[]string{"memory", "file", "redis", "mysql"})
13941394
SessionConfig.ProviderConfig = strings.Trim(Cfg.Section("session").Key("PROVIDER_CONFIG").MustString(path.Join(AppDataPath, "sessions")), "\" ")
1395-
if !filepath.IsAbs(SessionConfig.ProviderConfig) {
1395+
if SessionConfig.Provider == "file" && !filepath.IsAbs(SessionConfig.ProviderConfig) {
13961396
SessionConfig.ProviderConfig = path.Join(AppWorkPath, SessionConfig.ProviderConfig)
13971397
}
13981398
SessionConfig.CookieName = Cfg.Section("session").Key("COOKIE_NAME").MustString("i_like_gitea")

0 commit comments

Comments
 (0)