aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorPhil Hopper <philhopper@sibertec.com>2017-06-06 05:09:54 -0400
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-06-06 04:09:54 -0500
commit6ec07a6bd7d1f88f0685efa4e1b62a32cbb25e43 (patch)
treefa6b6ef919193243d640b814b8ca82dbb5bd9d27 /modules/setting
parentcbdd5f787c2124ab604c9ab60b1de20c05a26b4c (diff)
downloadgitea-6ec07a6bd7d1f88f0685efa4e1b62a32cbb25e43.tar.gz
gitea-6ec07a6bd7d1f88f0685efa4e1b62a32cbb25e43.zip
Make `LocalCopyPath` a setting instead of a hard-coded path (#1881)
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index a948527a2c..cd2d4ab720 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -174,6 +174,11 @@ var (
FileMaxSize int64
MaxFiles int
} `ini:"-"`
+
+ // Repository local settings
+ Local struct {
+ LocalCopyPath string
+ } `ini:"-"`
}{
AnsiCharset: "",
ForcePrivate: false,
@@ -206,6 +211,13 @@ var (
FileMaxSize: 3,
MaxFiles: 5,
},
+
+ // Repository local settings
+ Local: struct {
+ LocalCopyPath string
+ }{
+ LocalCopyPath: "tmp/local-repo",
+ },
}
RepoRootPath string
ScriptType = "bash"
@@ -887,6 +899,8 @@ please consider changing to GITEA_CUSTOM`)
log.Fatal(4, "Failed to map Repository.Editor settings: %v", err)
} else if err = Cfg.Section("repository.upload").MapTo(&Repository.Upload); err != nil {
log.Fatal(4, "Failed to map Repository.Upload settings: %v", err)
+ } else if err = Cfg.Section("repository.local").MapTo(&Repository.Local); err != nil {
+ log.Fatal(4, "Failed to map Repository.Local settings: %v", err)
}
if !filepath.IsAbs(Repository.Upload.TempPath) {