container/init: use absolute compare method

More checks are also added.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-20 17:14:36 +09:00
parent 31f0dd36df
commit 97ab24feef
8 changed files with 62 additions and 23 deletions

View File

@@ -32,8 +32,7 @@ func (m *MkdirOp) apply(*setupState) error {
func (m *MkdirOp) Is(op Op) bool {
vm, ok := op.(*MkdirOp)
return ok && ((m == nil && vm == nil) || (m != nil && vm != nil &&
m.Path != nil && vm.Path != nil &&
m.Path.String() == vm.Path.String() &&
m.Path != nil && vm.Path != nil && m.Path.Is(vm.Path) &&
m.Perm == vm.Perm))
}
func (*MkdirOp) prefix() string { return "creating" }