diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-30 18:15:56 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-30 18:24:53 +0900 |
| commit | a6600be34ad812ff13c89f45c3cadaac6d994e67 (patch) | |
| tree | 48c8cd6daab8084eb9391c7ee16f2b38f1cf280f /internal/pipewire | |
| parent | b5592633f5b980970808fc5be43b0fb4f4d4e784 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire')
| -rw-r--r-- | internal/pipewire/pipewire.go | 12 |
1 files changed, 6 insertions, 6 deletions
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)) } } |
