fix: match lowercase of the input, not of the model

This commit is contained in:
Ettore Di Giacinto 2023-08-08 00:46:22 +02:00
parent b09bae3443
commit 63b01199fe

View File

@ -85,7 +85,7 @@ func InstallModelFromGalleryByName(galleries []Gallery, name string, basePath st
name = strings.ReplaceAll(name, string(os.PathSeparator), "__")
var model *GalleryModel
for _, m := range models {
if name == m.Name || name == strings.ToLower(m.Name) {
if name == m.Name || m.Name == strings.ToLower(name) {
model = m
}
}