1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

Fix handling of subgroups in GetDescriptionNames.

This commit is contained in:
Juliusz Chroboczek 2024-10-25 16:10:39 +02:00
parent 1db15045a3
commit 86fac519a5

View file

@ -556,11 +556,13 @@ func GetDescriptionNames() ([]string, error) {
if base[0] == '.' { if base[0] == '.' {
return nil return nil
} }
if strings.HasSuffix(base, ".json") { p, err := filepath.Rel(Directory, path)
names = append(names, strings.TrimSuffix( if err != nil || !strings.HasSuffix(p, ".json") {
base, ".json", return nil
))
} }
names = append(names, strings.TrimSuffix(
p, ".json",
))
return nil return nil
}, },
) )