diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-11-01 04:51:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-31 16:51:48 -0400 |
commit | e4e85a3e51066f4987a87762c9c69acda093f6ca (patch) | |
tree | 14c00ee9e19dcec4ac2a93e6b5a0f0ec343f824c /modules/setting | |
parent | e7750e0f6a4fb032bb0f717caf2b8a10a6ede873 (diff) | |
download | gitea-e4e85a3e51066f4987a87762c9c69acda093f6ca.tar.gz gitea-e4e85a3e51066f4987a87762c9c69acda093f6ca.zip |
Storage configuration support `[storage]` (#13314)
* Fix minio bug
* Add tests for storage configuration
* Change the Seek flag to keep compitable minio?
* Fix test when first-byte-pos of all ranges is greater than the resource length
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/storage.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/setting/storage.go b/modules/setting/storage.go index e743d6c20c..27788da1ff 100644 --- a/modules/setting/storage.go +++ b/modules/setting/storage.go @@ -32,14 +32,12 @@ func (s *Storage) MapTo(v interface{}) error { } func getStorage(name, typ string, overrides ...*ini.Section) Storage { - sectionName := "storage" - if len(name) > 0 { - sectionName = sectionName + "." + typ - } + const sectionName = "storage" sec := Cfg.Section(sectionName) if len(overrides) == 0 { overrides = []*ini.Section{ + Cfg.Section(sectionName + "." + typ), Cfg.Section(sectionName + "." + name), } } |