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/pkg/pkg.go | |
| 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/pkg/pkg.go')
| -rw-r--r-- | internal/pkg/pkg.go | 5 |
1 files changed, 2 insertions, 3 deletions
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[:])) } |
