Skip to content

Commit

Permalink
Write absolute AppDataPath to app.ini when installing (#25331)
Browse files Browse the repository at this point in the history
If the APP_DATA_PATH isn't written into the config when installing, then
its value is uncertain because some Gitea command doesn't run with
correct WorkPath.

This is a quick fix for #25330  and can be backported.
  • Loading branch information
wxiaoguang committed Jun 18, 2023
1 parent 1d92d0c commit 1ea6b8f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions routers/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ func SubmitInstall(ctx *context.Context) {
cfg.Section("server").Key("DOMAIN").SetValue(form.Domain)
cfg.Section("server").Key("HTTP_PORT").SetValue(form.HTTPPort)
cfg.Section("server").Key("ROOT_URL").SetValue(form.AppURL)
cfg.Section("server").Key("APP_DATA_PATH").SetValue(setting.AppDataPath)

if form.SSHPort == 0 {
cfg.Section("server").Key("DISABLE_SSH").SetValue("true")
Expand Down

0 comments on commit 1ea6b8f

Please sign in to comment.