From e4e85a3e51066f4987a87762c9c69acda093f6ca Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 1 Nov 2020 04:51:48 +0800 Subject: 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 --- modules/setting/storage.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/setting') 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), } } -- cgit v1.2.3