aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting/storage.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/storage.go')
-rw-r--r--modules/setting/storage.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/setting/storage.go b/modules/setting/storage.go
index 3ab08d8d2a..075152db59 100644
--- a/modules/setting/storage.go
+++ b/modules/setting/storage.go
@@ -43,6 +43,10 @@ func getStorage(name, typ string, targetSec *ini.Section) Storage {
sec.Key("MINIO_LOCATION").MustString("us-east-1")
sec.Key("MINIO_USE_SSL").MustBool(false)
+ if targetSec == nil {
+ targetSec, _ = Cfg.NewSection(name)
+ }
+
var storage Storage
storage.Section = targetSec
storage.Type = typ