aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-06-18 21:57:43 +0800
committerGitHub <noreply@github.com>2023-06-18 13:57:43 +0000
commit1ea6b8fd767f5378075de1097c1c1044a7696cd7 (patch)
tree6e460bf50dfad2a4ad83ac9f3c88b8d4b26fdc80 /routers
parent1d92d0cf0f1799d6d6b167f9b0b5e8140b5d43ea (diff)
downloadgitea-1ea6b8fd767f5378075de1097c1c1044a7696cd7.tar.gz
gitea-1ea6b8fd767f5378075de1097c1c1044a7696cd7.zip
Write absolute AppDataPath to app.ini when installing (#25331)
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.
Diffstat (limited to 'routers')
-rw-r--r--routers/install/install.go1
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")