Add companion application

This commit is contained in:
2026-05-08 20:47:02 +02:00
parent 5fcca77d58
commit 7209aebc62
15 changed files with 802 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
//go:build windows
package main
import "os/exec"
// openOSPath asks Windows to open a file in the default app, or a folder in
// Explorer. `cmd /c start` handles default-handler dispatch for files; the
// empty "" argument is the window title required by start.
func openOSPath(p string, isFolder bool) error {
if isFolder {
return exec.Command("explorer.exe", p).Start()
}
return exec.Command("cmd", "/c", "start", "", p).Start()
}