summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-06-30 23:10:04 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2017-07-01 11:10:04 +0800
commit3c0705ecf3167c1d782a5f3ed26ff0041bc4879d (patch)
tree486066fd565ed842345acb56b69cc16e4c367786
parent12cb6cd3c9b729e7d0c7983a8d8597a89498f307 (diff)
downloadgitea-3c0705ecf3167c1d782a5f3ed26ff0041bc4879d.tar.gz
gitea-3c0705ecf3167c1d782a5f3ed26ff0041bc4879d.zip
Absolute path for setting.CustomConf (#2085)
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index d07dce39a0..f24a87653b 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -595,6 +595,8 @@ func NewContext() {
if len(CustomConf) == 0 {
CustomConf = CustomPath + "/conf/app.ini"
+ } else if !filepath.IsAbs(CustomConf) {
+ CustomConf = filepath.Join(workDir, CustomConf)
}
if com.IsFile(CustomConf) {