1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 08:35:57 +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] == '.' {
return nil
}
if strings.HasSuffix(base, ".json") {
names = append(names, strings.TrimSuffix(
base, ".json",
))
p, err := filepath.Rel(Directory, path)
if err != nil || !strings.HasSuffix(p, ".json") {
return nil
}
names = append(names, strings.TrimSuffix(
p, ".json",
))
return nil
},
)