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 --- cmd/hsu/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/hsu') diff --git a/cmd/hsu/main.go b/cmd/hsu/main.go index 497279b8..2acc8d4c 100644 --- a/cmd/hsu/main.go +++ b/cmd/hsu/main.go @@ -58,7 +58,7 @@ import ( "fmt" "log" "os" - "path" + "path/filepath" "runtime" "slices" "strconv" @@ -102,13 +102,13 @@ func main() { log.Fatal("this program must not be started by root") } - if !path.IsAbs(hakureiPath) { + if !filepath.IsAbs(hakureiPath) { log.Fatal("this program is compiled incorrectly") return } var toolPath string - pexe := path.Join("/proc", strconv.Itoa(os.Getppid()), "exe") + pexe := filepath.Join("/proc", strconv.Itoa(os.Getppid()), "exe") if p, err := os.Readlink(pexe); err != nil { log.Fatalf("cannot read parent executable path: %v", err) } else if strings.HasSuffix(p, " (deleted)") { -- cgit v1.3.1