From 79202633a79be4c6a33966a676d77bdb8c52e7c0 Mon Sep 17 00:00:00 2001 From: zeripath Date: Fri, 7 May 2021 02:21:34 +0100 Subject: [PATCH] Fix bug where repositories appear unadopted (#15757) Fix bug where repositories with capital letters in their names appear unadopted. Fix #15755 Co-authored-by: Lunny Xiao --- modules/repository/adopt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/repository/adopt.go b/modules/repository/adopt.go index 0302119630562..a37f770496332 100644 --- a/modules/repository/adopt.go +++ b/modules/repository/adopt.go @@ -228,7 +228,7 @@ func ListUnadoptedRepositories(query string, opts *models.ListOptions) ([]string found := false repoLoop: for i, repo := range repos { - if repo.Name == name { + if repo.LowerName == name { found = true repos = append(repos[:i], repos[i+1:]...) break repoLoop