summaryrefslogtreecommitdiffstats
path: root/modules/setting/lfs.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/lfs.go')
-rw-r--r--modules/setting/lfs.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/setting/lfs.go b/modules/setting/lfs.go
index 0e0f7b74e3..21a46a8cce 100644
--- a/modules/setting/lfs.go
+++ b/modules/setting/lfs.go
@@ -34,7 +34,14 @@ func loadLFSFrom(rootCfg ConfigProvider) error {
// Specifically default PATH to LFS_CONTENT_PATH
// 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
- deprecatedSettingFatal(rootCfg, "server", "LFS_CONTENT_PATH", "lfs", "PATH", "v1.19.0")
+ deprecatedSetting(rootCfg, "server", "LFS_CONTENT_PATH", "lfs", "PATH", "v1.19.0")
+
+ if val := sec.Key("LFS_CONTENT_PATH").String(); val != "" {
+ if lfsSec == nil {
+ lfsSec = rootCfg.Section("lfs")
+ }
+ lfsSec.Key("PATH").MustString(val)
+ }
var err error
LFS.Storage, err = getStorage(rootCfg, "lfs", "", lfsSec)