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

Fix unittest and repo create bug (#33061)

1. `StatDir` was not right, fix the FIXME
2. Clarify the test cases for `IsUsableRepoName`
3. Fix regression bug in `repo-new.ts`

Fix #33060
This commit is contained in:
wxiaoguang
2024-12-31 18:45:05 +08:00
committed by GitHub
parent 58c092cfea
commit a0853e2278
9 changed files with 81 additions and 83 deletions

View File

@@ -81,7 +81,7 @@ func LoadRepoConfig() error {
if isDir, err := util.IsDir(customPath); err != nil {
return fmt.Errorf("failed to check custom %s dir: %w", t, err)
} else if isDir {
if typeFiles[i].custom, err = util.StatDir(customPath); err != nil {
if typeFiles[i].custom, err = util.ListDirRecursively(customPath, &util.ListDirOptions{SkipCommonHiddenNames: true}); err != nil {
return fmt.Errorf("failed to list custom %s files: %w", t, err)
}
}