fixup static-root-path.patch

This commit is contained in:
Charlotte 🦝 Delenk 2022-06-26 08:28:49 +01:00
parent 3091bba495
commit 3c690822e6
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
2 changed files with 16 additions and 0 deletions

View file

@ -87,6 +87,9 @@ in {
url = "https://github.com/go-gitea/gitea/releases/download/v1.17.0-rc1/gitea-src-1.17.0-rc1.tar.gz";
sha256 = "sha256-9pu+fsU1rrfa9yOAxnh8tXDmxv4UYo5DP5azhJC0BpQ=";
};
patches = [
../../extra/gitea.patch
];
});
})
];

13
extra/gitea.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 7be0842..f3d01dd 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -778,7 +778,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
if len(StaticRootPath) == 0 {
- StaticRootPath = AppWorkPath
+ StaticRootPath = "@data@"
}
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath)
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)