Skip to content

Commit

Permalink
Update theme.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterlocker committed Aug 1, 2024
1 parent b7ed63a commit e28692d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ui/theme/theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,13 @@ func (m *MyTheme) ListThemeFiles() map[string]string {
pattern := filepath.Join(m.themeFileDir, "/*.toml")
files, err := filepath.Glob(pattern)
if err != nil {
log.Fatalf("Failed to glob files: %v", err)
log.Printf("Failed to glob files: %v", err)
}

result := make(map[string]string)
for _, filePath := range files {
// Clean the path to avoid issues with slashes
cleanPath := filepath.Clean(filePath)
log.Printf("Trying to read theme file: %s", cleanPath)

// Now read the theme file, using the cleaned path
if themeFile, err := ReadThemeFile(cleanPath); err == nil {
Expand Down

0 comments on commit e28692d

Please sign in to comment.