0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-12 18:03:53 +02:00

Update modules/setting/repository.go

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
Dmitry Frolov 2023-05-19 06:44:48 +00:00 committed by GitHub
parent 57c94e63cb
commit 656a3dc721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -298,13 +298,7 @@ func loadRepositoryFrom(rootCfg ConfigProvider) {
sec := rootCfg.Section("repository")
EnableSizeLimit = sec.Key("ENABLE_SIZE_LIMIT").MustBool(false)
v, err := humanize.ParseBytes(sec.Key("REPO_SIZE_LIMIT").MustString("0"))
if err == nil {
RepoSizeLimit = int64(v)
} else {
RepoSizeLimit = 0
}
RepoSizeLimit, _ = humanize.ParseBytes(sec.Key("REPO_SIZE_LIMIT").MustString("0"))
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
Repository.UseCompatSSHURI = sec.Key("USE_COMPAT_SSH_URI").MustBool()