If group name is empty, use directory name

This commit is contained in:
Ben Adrian Sarmiento
2024-06-20 04:38:33 +02:00
parent 8921b33b6a
commit 6e07701f9e

View File

@@ -69,6 +69,9 @@ func (z *ZurgConfigV1) GetGroupMap() map[string][]string {
// Populate the groupMap and groupOrderMap
for directory, val := range z.Directories {
if val.Group == "" {
val.Group = directory
}
groupMap[val.Group] = append(groupMap[val.Group], directory)
groupOrderMap[directory] = val.GroupOrder
}