1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Disallow duplicate storage paths (#26484)

Replace #26380
This commit is contained in:
Lunny Xiao
2024-02-09 22:06:03 +08:00
committed by GitHub
parent c7a21cbb0c
commit 92fda9c5a2
7 changed files with 42 additions and 20 deletions

View File

@@ -285,6 +285,9 @@ func loadRepositoryFrom(rootCfg ConfigProvider) {
} else {
RepoRootPath = filepath.Clean(RepoRootPath)
}
fatalDuplicatedPath("repository.ROOT", RepoRootPath)
defaultDetectedCharsetsOrder := make([]string, 0, len(Repository.DetectedCharsetsOrder))
for _, charset := range Repository.DetectedCharsetsOrder {
defaultDetectedCharsetsOrder = append(defaultDetectedCharsetsOrder, strings.ToLower(strings.TrimSpace(charset)))