Refactor openlocation feature

This commit is contained in:
2026-01-06 14:06:27 +01:00
parent c492c96109
commit d6f19b51cc
4 changed files with 106 additions and 80 deletions

View File

@@ -0,0 +1,14 @@
//go:build windows
package openfolder
import (
"os/exec"
"strings"
)
func OpenLocation(path string) error {
// explorer requires backslashes.
p := strings.ReplaceAll(path, "/", "\\")
return exec.Command("explorer.exe", p).Start()
}