From 41f7d58edf101836b33ea8a3d459b3c0a37e4f5f Mon Sep 17 00:00:00 2001 From: piotr Date: Tue, 20 Sep 2022 23:01:35 +0200 Subject: [PATCH] debug #69 --- tools.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools.go b/tools.go index 7a29af7..9dc8a20 100644 --- a/tools.go +++ b/tools.go @@ -300,13 +300,16 @@ func listDesktopFiles() []string { } func setUpCategories() { - path := filepath.Join(getDataHome(), "nwg-drawer/desktop-directories") + p := filepath.Join(getDataHome(), "nwg-drawer/desktop-directories") + log.Debugf("Desktop dirs location: %s", p) var other category for _, cName := range categoryNames { fileName := fmt.Sprintf("%s.directory", cName) - lines, err := loadTextFile(filepath.Join(path, fileName)) + fp := filepath.Join(p, fileName) + lines, err := loadTextFile(fp) if err == nil { + log.Debugf("Opened file '%s'", fp) var cat category cat.Name = cName @@ -350,6 +353,8 @@ func setUpCategories() { } else { other = cat } + } else { + log.Errorf("Couldn't open %s", fp) } } sort.Slice(categories, func(i, j int) bool {