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/pkg/pkg.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/pkg/pkg.go') diff --git a/internal/pkg/pkg.go b/internal/pkg/pkg.go index a8fb91ba..ea7ac815 100644 --- a/internal/pkg/pkg.go +++ b/internal/pkg/pkg.go @@ -16,7 +16,6 @@ import ( "iter" "maps" "os" - "path" "path/filepath" "runtime" "slices" @@ -894,7 +893,7 @@ func (c *Cache) Scrub(checks int) error { se.DanglingIdentifiers = append(se.DanglingIdentifiers, *want) seMu.Unlock() return false - } else if err = Decode(got, path.Base(linkname)); err != nil { + } else if err = Decode(got, filepath.Base(linkname)); err != nil { seMu.Lock() lnp := dir.Append(linkname) se.Errs[lnp.Handle()] = append(se.Errs[lnp.Handle()], err) @@ -1488,7 +1487,7 @@ func (c *Cache) cure(a Artifact, curesExempt bool) ( return } buf := c.getIdentBuf() - err = Decode((*Checksum)(buf[:]), path.Base(name)) + err = Decode((*Checksum)(buf[:]), filepath.Base(name)) if err == nil { checksum = unique.Make(Checksum(buf[:])) } -- cgit v1.3.1