diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-20 02:03:18 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-20 02:14:39 +0900 |
| commit | 375acb476d36cac8e122ae8c45628bd8e7e0f0ca (patch) | |
| tree | 59899fe31c847724ac1a0d4055420a0a751c3ab0 /container/autoroot.go | |
| parent | c81c9a9d75f179988cf858b85fe2de71bf9c2ff4 (diff) | |
container/autoroot: check host path equivalence by value
This will never return true otherwise unless the equivalent paths happen to be interned by the caller.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/autoroot.go')
| -rw-r--r-- | container/autoroot.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/container/autoroot.go b/container/autoroot.go index 6145ec6f..640d72d1 100644 --- a/container/autoroot.go +++ b/container/autoroot.go @@ -73,7 +73,9 @@ func (r *AutoRootOp) apply(state *setupState) error { func (r *AutoRootOp) Is(op Op) bool { vr, ok := op.(*AutoRootOp) return ok && ((r == nil && vr == nil) || (r != nil && vr != nil && - r.Host == vr.Host && r.Prefix == vr.Prefix && r.Flags == vr.Flags)) + r.Host != nil && vr.Host != nil && + r.Host.String() == vr.Host.String() && + r.Prefix == vr.Prefix && r.Flags == vr.Flags)) } func (*AutoRootOp) prefix() string { return "setting up" } func (r *AutoRootOp) String() string { |
