diff --git a/bin/nwg-drawer b/bin/nwg-drawer index 316803b..7f27557 100755 Binary files a/bin/nwg-drawer and b/bin/nwg-drawer differ diff --git a/tools.go b/tools.go index 3d53167..ee4e9f2 100644 --- a/tools.go +++ b/tools.go @@ -650,8 +650,8 @@ func open(filePath string, xdgOpen bool) { cmd = exec.Command("xdg-open", filePath) // Look for possible custom file association for key, element := range preferredApps { - r, _ := regexp.Compile(key) - if r.MatchString(filePath) { + r, err := regexp.Compile(key) + if err == nil && r.MatchString(filePath) { cmd = exec.Command(fmt.Sprintf("%v", element), filePath) break } @@ -659,7 +659,7 @@ func open(filePath string, xdgOpen bool) { } else { cmd = exec.Command(*fileManager, filePath) } - fmt.Println(cmd) + fmt.Printf("Executing: %s", cmd) cmd.Start() gtk.MainQuit()