mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-18 20:09:26 +00:00
[GITEA] add GetFile to config provider
(cherry picked from commit88d1b53eea
) (cherry picked from commitf63f71afad
) (cherry picked from commit1f774145fc
) (cherry picked from commit53e637693b
)
This commit is contained in:
parent
d8855ef27c
commit
4974cbf10a
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue