aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/initsymlink.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-30 18:15:56 +0900
committerOphestra <cat@gensokyo.uk>2026-03-30 18:24:53 +0900
commita6600be34ad812ff13c89f45c3cadaac6d994e67 (patch)
tree48c8cd6daab8084eb9391c7ee16f2b38f1cf280f /container/initsymlink.go
parentb5592633f5b980970808fc5be43b0fb4f4d4e784 (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 'container/initsymlink.go')
-rw-r--r--container/initsymlink.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/container/initsymlink.go b/container/initsymlink.go
index f4f608a6..e72e5ef4 100644
--- a/container/initsymlink.go
+++ b/container/initsymlink.go
@@ -3,7 +3,7 @@ package container
import (
"encoding/gob"
"fmt"
- "path"
+ "path/filepath"
"hakurei.app/check"
)
@@ -30,7 +30,7 @@ func (l *SymlinkOp) Valid() bool { return l != nil && l.Target != nil && l.LinkN
func (l *SymlinkOp) early(_ *setupState, k syscallDispatcher) error {
if l.Dereference {
- if !path.IsAbs(l.LinkName) {
+ if !filepath.IsAbs(l.LinkName) {
return check.AbsoluteError(l.LinkName)
}
if name, err := k.readlink(l.LinkName); err != nil {
@@ -44,7 +44,7 @@ func (l *SymlinkOp) early(_ *setupState, k syscallDispatcher) error {
func (l *SymlinkOp) apply(state *setupState, k syscallDispatcher) error {
target := toSysroot(l.Target.String())
- if err := k.mkdirAll(path.Dir(target), state.ParentPerm); err != nil {
+ if err := k.mkdirAll(filepath.Dir(target), state.ParentPerm); err != nil {
return err
}
return k.symlink(l.LinkName, target)