From 706b0f72e2e4bc91bdbed38fee609cabe9f44e43 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 29 Oct 2015 20:40:57 -0400 Subject: fix issue comment mention and autofix count when start --- modules/setting/setting.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/setting/setting.go') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 88209b25..743127d0 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) -- cgit v1.2.3