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 --- container/path.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'container/path.go') diff --git a/container/path.go b/container/path.go index 5170fceb..5ae52dee 100644 --- a/container/path.go +++ b/container/path.go @@ -4,7 +4,7 @@ import ( "errors" "io/fs" "os" - "path" + "path/filepath" "strconv" "strings" "syscall" @@ -29,16 +29,16 @@ const ( func toSysroot(name string) string { name = strings.TrimLeftFunc(name, func(r rune) bool { return r == '/' }) - return path.Join(sysrootPath, name) + return filepath.Join(sysrootPath, name) } func toHost(name string) string { name = strings.TrimLeftFunc(name, func(r rune) bool { return r == '/' }) - return path.Join(hostPath, name) + return filepath.Join(hostPath, name) } func createFile(name string, perm, pperm os.FileMode, content []byte) error { - if err := os.MkdirAll(path.Dir(name), pperm); err != nil { + if err := os.MkdirAll(filepath.Dir(name), pperm); err != nil { return err } f, err := os.OpenFile(name, syscall.O_CREAT|syscall.O_EXCL|syscall.O_WRONLY, perm) -- cgit v1.3.1