From eed6f8e80e0c99cc3ab3a367ae9e00185bb73808 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Sun, 4 Jan 2026 16:17:46 -0500 Subject: [PATCH] Fix opening logs folder on Windows --- main.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e4c0e74..853b247 100644 --- a/main.go +++ b/main.go @@ -477,7 +477,11 @@ func openFolder(path string) error { var cmd *exec.Cmd switch runtime.GOOS { case "windows": - cmd = utils.CreateCommandRaw("explorer", path) + p := filepath.Clean(filepath.FromSlash(path)) + if abs, err := filepath.Abs(p); err == nil { + p = abs + } + cmd = utils.CreateCommandRaw("cmd", "/c", "start", "", p) case "darwin": cmd = utils.CreateCommandRaw("open", path) default: @@ -494,7 +498,11 @@ func openFile(path string) error { var cmd *exec.Cmd switch runtime.GOOS { case "windows": - cmd = utils.CreateCommandRaw("explorer", path) + p := filepath.Clean(filepath.FromSlash(path)) + if abs, err := filepath.Abs(p); err == nil { + p = abs + } + cmd = utils.CreateCommandRaw("cmd", "/c", "start", "", p) case "darwin": cmd = utils.CreateCommandRaw("open", path) default: