From e85e9fb306019f4b5dfd9d635b2278391aeb1a88 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 12 Apr 2023 16:18:47 +0800 Subject: [PATCH] Update modules/setting/storage.go Co-authored-by: wxiaoguang --- modules/setting/storage.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/setting/storage.go b/modules/setting/storage.go index fbe1181bb5c7d..6d33a5bf4e7ed 100644 --- a/modules/setting/storage.go +++ b/modules/setting/storage.go @@ -47,10 +47,11 @@ func getStorageSection(rootCfg ConfigProvider) *ini.Section { } // getStorage will read storage configurations from 4 possible ways -// 1 read configurations from [$name] if the item exist -// 2 read configurations from [storage.$name] if the item exist -// 3 read configurations from [storage.$typ] if the item exist -// 4 read configurations from [storage] if the item exist +// 1 read configurations from [$name] if the setting keys exist (eg: name="attachments") +// 2 read configurations from [storage.$name] if the keys exist +// 3 read configurations from [storage.$type] if the keys exist (eg: type="local" or "minio") +// 4 read configurations from [storage] if the keys exist +// The keys in earlier section have higher priority. func getStorage(rootCfg ConfigProvider, name, typ string, targetSec *ini.Section) Storage { if targetSec == nil { targetSec, _ = rootCfg.NewSection(name)