summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-08 22:23:01 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-08 22:23:01 -0500
commit3cc04682c5ad3296df3fc1b4209ee8b669da410e (patch)
tree664d468346ab501df813b13f3a6f28e7431c7428 /modules/setting
parentf15fa9167ade8262bed437451585d319f12d1182 (diff)
downloadgitea-3cc04682c5ad3296df3fc1b4209ee8b669da410e.tar.gz
gitea-3cc04682c5ad3296df3fc1b4209ee8b669da410e.zip
modules/setting: mirror path issue
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index f5212a2867..55e0a79ab8 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -237,7 +237,7 @@ func NewConfigContext() {
ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER")
sec = Cfg.Section("attachment")
- AttachmentPath = sec.Key("PATH").MustString("data/attachments")
+ AttachmentPath = path.Join(workDir, sec.Key("PATH").MustString("data/attachments"))
AttachmentAllowedTypes = sec.Key("ALLOWED_TYPES").MustString("image/jpeg|image/png")
AttachmentMaxSize = sec.Key("MAX_SIZE").MustInt64(32)
AttachmentMaxFiles = sec.Key("MAX_FILES").MustInt(10)
@@ -294,7 +294,7 @@ func NewConfigContext() {
sec = Cfg.Section("picture")
PictureService = sec.Key("SERVICE").In("server", []string{"server"})
- AvatarUploadPath = sec.Key("AVATAR_UPLOAD_PATH").MustString("data/avatars")
+ AvatarUploadPath = path.Join(workDir, sec.Key("AVATAR_UPLOAD_PATH").MustString("data/avatars"))
os.MkdirAll(AvatarUploadPath, os.ModePerm)
switch sec.Key("GRAVATAR_SOURCE").MustString("gravatar") {
case "duoshuo":