From 4974cbf10a8b51d51591fa6f6281f4cd7a415c91 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 11 Aug 2023 11:06:31 +0200 Subject: [PATCH] [GITEA] add GetFile to config provider (cherry picked from commit 88d1b53eeaa0d5ad0ed54c191236db928aadedf0) (cherry picked from commit f63f71afad2aa8272772dba919485c5e858d2fae) (cherry picked from commit 1f774145fc731e2d93cf8a6708dbf4c15722fa5e) (cherry picked from commit 53e637693bcbb9fe9daca9a296c9d2c700fc915b) --- modules/setting/config_provider.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/setting/config_provider.go b/modules/setting/config_provider.go index d00164df9e..def3df09f4 100644 --- a/modules/setting/config_provider.go +++ b/modules/setting/config_provider.go @@ -53,6 +53,7 @@ type ConfigProvider interface { Save() error SaveTo(filename string) error + GetFile() string DisableSaving() PrepareSaving() (ConfigProvider, error) IsLoadedFromEmpty() bool @@ -251,6 +252,10 @@ func (p *iniConfigProvider) GetSection(name string) (ConfigSection, error) { var errDisableSaving = errors.New("this config can't be saved, developers should prepare a new config to save") +func (p *iniConfigProvider) GetFile() string { + return p.file +} + // Save saves the content into file func (p *iniConfigProvider) Save() error { if p.disableSaving {