From 4751485de2bf292ac0386a0d1d6aab795ce9e815 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Thu, 8 Jun 2023 09:32:01 +0200 Subject: [PATCH] [GITEA] avoid creation of deprecated LFS_CONTENT_PATH setting Fixes: https://codeberg.org/forgejo/forgejo/issues/818 (cherry picked from commit 412bb994d5364eb6df208f0cdc4bfabb70b9be0b) (cherry picked from commit 15e6e2c7d7bec8116629c424f3c306f9433b691c) --- modules/setting/lfs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/setting/lfs.go b/modules/setting/lfs.go index a5c3631681..7c6a9fb35c 100644 --- a/modules/setting/lfs.go +++ b/modules/setting/lfs.go @@ -36,7 +36,9 @@ func loadLFSFrom(rootCfg ConfigProvider) { // DEPRECATED should not be removed because users maybe upgrade from lower version to the latest version // if these are removed, the warning will not be shown deprecatedSetting(rootCfg, "server", "LFS_CONTENT_PATH", "lfs", "PATH", "v1.19.0") - lfsSec.Key("PATH").MustString(sec.Key("LFS_CONTENT_PATH").String()) + if sec.HasKey("LFS_CONTENT_PATH") { + lfsSec.Key("PATH").MustString(sec.Key("LFS_CONTENT_PATH").String()) + } LFS.Storage = getStorage(rootCfg, "lfs", storageType, lfsSec)