From 20f022de72b40f55b465cbb97982dead190fcd16 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) (cherry picked from commit 4974cbf10a8b51d51591fa6f6281f4cd7a415c91) (cherry picked from commit 554bca7fae7fa6f0235ab631598115875711d80e) (cherry picked from commit 61b8cf83b988a2d8547b81cfb7aaeefaf2e17fba) (cherry picked from commit d8bcc6f68c6dc972e8c99eb7b46a4f096f85cd61) (cherry picked from commit ee04c340724cccada2c71db45ec510d19e92e099) (cherry picked from commit 713153a6d63205984f2a85ee07f08269df3b0a85) (cherry picked from commit 4e18c4f8bb35b02494d75311986fadb87328d477) (cherry picked from commit 32be9db12df3dea9c12bf803a5226b6ae8cd7b32) (cherry picked from commit fd50e9b9b4d7cd804e57418056126ed2df9bec6a) (cherry picked from commit 11717b864bf4d820305511cf22ec50f61604a770) (cherry picked from commit b70f3e0fa5db9cd90c961138c1ab748aa5c6a4d8) (cherry picked from commit 2d802b2963d18b28a85a82e01f7a7f18ab8c3192) (cherry picked from commit f61e2f71e2d629cc4e480f9e61c9b383675da0ef) (cherry picked from commit 31723651c96d3f20811540aad94878815795da15) (cherry picked from commit 38f6f703a0dfb04a9d436c8c806f1be513c7ea3a) (cherry picked from commit 75f6716905755cbe3d7e49d965ab81a47f625bb7) (cherry picked from commit fed2b2daf5d44348a0096572e91708ac3db5e9c8) (cherry picked from commit a9bafa50213a3a385ba3901b2730fb84149855cc) (cherry picked from commit 8ce897b3fe918c5702d5c86d97f1703a1f266697) (cherry picked from commit c806addcd07c6afb20d9aca833cfa9a33ac680a7) (cherry picked from commit e70d51bd26b49de93b2fe012a4f03efbe6c97607) --- 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 132f4acea..e1c25ed9c 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 @@ -256,6 +257,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 {