From a6600be34ad812ff13c89f45c3cadaac6d994e67 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 30 Mar 2026 18:15:56 +0900 Subject: all: use filepath This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux. Signed-off-by: Ophestra --- internal/pipewire/pipewire.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/pipewire') diff --git a/internal/pipewire/pipewire.go b/internal/pipewire/pipewire.go index 0538863a..3b909336 100644 --- a/internal/pipewire/pipewire.go +++ b/internal/pipewire/pipewire.go @@ -20,7 +20,7 @@ import ( "fmt" "io" "os" - "path" + "path/filepath" "runtime" "slices" "strconv" @@ -973,23 +973,23 @@ func connectName(name string, manager bool) (conn Conn, err error) { return connectName(name+"-manager", false) } - if path.IsAbs(name) || (len(name) > 0 && name[0] == '@') { + if filepath.IsAbs(name) || (len(name) > 0 && name[0] == '@') { return Dial(name) } else { runtimeDir, ok := os.LookupEnv("PIPEWIRE_RUNTIME_DIR") - if !ok || !path.IsAbs(runtimeDir) { + if !ok || !filepath.IsAbs(runtimeDir) { runtimeDir, ok = os.LookupEnv("XDG_RUNTIME_DIR") } - if !ok || !path.IsAbs(runtimeDir) { + if !ok || !filepath.IsAbs(runtimeDir) { // this is cargo culted from windows stuff and has no effect normally; // keeping it to maintain compatibility in case someone sets this runtimeDir, ok = os.LookupEnv("USERPROFILE") } - if !ok || !path.IsAbs(runtimeDir) { + if !ok || !filepath.IsAbs(runtimeDir) { runtimeDir = DEFAULT_SYSTEM_RUNTIME_DIR } - return Dial(path.Join(runtimeDir, name)) + return Dial(filepath.Join(runtimeDir, name)) } } -- cgit v1.3.1