diff options
Diffstat (limited to 'routers/install.go')
-rw-r--r-- | routers/install.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/install.go b/routers/install.go index 4dd934aa04..88786efb95 100644 --- a/routers/install.go +++ b/routers/install.go @@ -20,6 +20,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/user" + "code.gitea.io/gitea/modules/util" "github.com/unknwon/com" "gopkg.in/ini.v1" @@ -260,7 +261,11 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { // Save settings. cfg := ini.Empty() - if com.IsFile(setting.CustomConf) { + isFile, err := util.IsFile(setting.CustomConf) + if err != nil { + log.Error("Unable to check if %s is a file. Error: %v", setting.CustomConf, err) + } + if isFile { // Keeps custom settings if there is already something. if err = cfg.Append(setting.CustomConf); err != nil { log.Error("Failed to load custom conf '%s': %v", setting.CustomConf, err) |