From a7a3e8b67541f3551b19e6007cda385803849d04 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 28 Apr 2024 17:58:31 -0400 Subject: [PATCH] Fix false circular dependencies --- icon-theme/icon-theme.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icon-theme/icon-theme.go b/icon-theme/icon-theme.go index 30884ac..d5e262b 100644 --- a/icon-theme/icon-theme.go +++ b/icon-theme/icon-theme.go @@ -136,7 +136,7 @@ func findTheme (name string, trail []string, warn bool, path ...string) (Theme, // parse parents for _, parent := range parents { - parentTheme, err := findTheme(name, trail, warn, path...) + parentTheme, err := findTheme(parent, trail, warn, path...) if err != nil { if warn { log.Printf ( @@ -149,8 +149,8 @@ func findTheme (name string, trail []string, warn bool, path ...string) (Theme, } // if no parents were successfuly parsed, inherit from hicolor - if theme.Inherits == nil { - hicolor, err := findTheme(name, trail, warn, path...) + if theme.Inherits == nil && name != "hicolor" { + hicolor, err := findTheme("hicolor", trail, warn, path...) if err != nil { return Theme { }, err } theme.Inherits = []Theme { hicolor } } @@ -179,7 +179,7 @@ func parseThemeIndex (reader io.Reader) (theme Theme, parents []string, err erro // Inherits (optional) if entry, ok := iconThemeGroup["Inherits"]; ok { - parents, err = keyValue.ParseMultiple ( + parents, err = keyValue.ParseMultipleComma ( keyValue.ParseString, entry.Value) if !ok { return Theme { }, nil, err }