diff options
author | Phil Hopper <philhopper@sibertec.com> | 2017-06-06 05:09:54 -0400 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-06-06 04:09:54 -0500 |
commit | 6ec07a6bd7d1f88f0685efa4e1b62a32cbb25e43 (patch) | |
tree | fa6b6ef919193243d640b814b8ca82dbb5bd9d27 /modules/setting | |
parent | cbdd5f787c2124ab604c9ab60b1de20c05a26b4c (diff) | |
download | gitea-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.go | 14 |
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) { |