diff options
author | Giteabot <teabot@gitea.io> | 2023-06-18 11:07:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-18 15:07:46 +0000 |
commit | ff18c3ba65b230f30c07e99277730a217576ee99 (patch) | |
tree | a548f7164e432428172a70615015d70edb1f0b18 /routers/install | |
parent | b673edbeafa4b6c72ad1c086d1f062bed41eef5f (diff) | |
download | gitea-ff18c3ba65b230f30c07e99277730a217576ee99.tar.gz gitea-ff18c3ba65b230f30c07e99277730a217576ee99.zip |
Write absolute AppDataPath to app.ini when installing (#25331) (#25347)
Backport #25331 by @wxiaoguang
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.
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/install')
-rw-r--r-- | routers/install/install.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/install/install.go b/routers/install/install.go index 4dba64df01..16bb55b685 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -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") |