diff options
author | Unknwon <u@gogs.io> | 2015-10-29 20:40:57 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-10-29 20:40:57 -0400 |
commit | 706b0f72e2e4bc91bdbed38fee609cabe9f44e43 (patch) | |
tree | 9b84a4556d0fef0c4e453b13daaab93e3b7b2591 /modules/setting/setting.go | |
parent | 1f4beb530cea9c098c79d3cd4d84671265dff0e0 (diff) | |
download | gitea-706b0f72e2e4bc91bdbed38fee609cabe9f44e43.tar.gz gitea-706b0f72e2e4bc91bdbed38fee609cabe9f44e43.zip |
fix issue comment mention and autofix count when start
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 88209b25b6..743127d018 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -43,10 +43,11 @@ const ( var ( // App settings. - AppVer string - AppName string - AppUrl string - AppSubUrl string + AppVer string + AppName string + AppUrl string + AppSubUrl string + AppDataPath = "data" // Server settings. Protocol Scheme @@ -319,7 +320,7 @@ func NewContext() { ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER") sec = Cfg.Section("attachment") - AttachmentPath = sec.Key("PATH").MustString("data/attachments") + AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments")) if !filepath.IsAbs(AttachmentPath) { AttachmentPath = path.Join(workDir, AttachmentPath) } @@ -387,7 +388,7 @@ func NewContext() { sec = Cfg.Section("picture") PictureService = sec.Key("SERVICE").In("server", []string{"server"}) - AvatarUploadPath = sec.Key("AVATAR_UPLOAD_PATH").MustString("data/avatars") + AvatarUploadPath = sec.Key("AVATAR_UPLOAD_PATH").MustString(path.Join(AppDataPath, "avatars")) forcePathSeparator(AvatarUploadPath) if !filepath.IsAbs(AvatarUploadPath) { AvatarUploadPath = path.Join(workDir, AvatarUploadPath) |