aboutsummaryrefslogtreecommitdiff
path: root/internal/engine/plan.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 10:56:21 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 10:56:21 +0200
commit1506c7dcd6032c04c1df6f5785b6dd3dfe4511cc (patch)
treefb6d573ca8726c1b1d91ba273a284ba666cde3f6 /internal/engine/plan.go
parentebdd7bb254a0f19f815a644d26ce232de7be0adb (diff)
downloadkrino-1506c7dcd6032c04c1df6f5785b6dd3dfe4511cc.tar.gz
krino-1506c7dcd6032c04c1df6f5785b6dd3dfe4511cc.zip
krino: duplicates are found, never deleted
A rule combining (duplicate) with a delete action is refused at load, and a file that is a duplicate under any duplicate scope its directory uses gets no delete step from any rule: the plan shows it skipped and the chain continues. A failed duplicate check blocks the delete too. Tests cover (matched), another rule's own condition, a test evaluation skipped, two scopes and a failed check, each checking every copy is still on disk.
Diffstat (limited to 'internal/engine/plan.go')
-rw-r--r--internal/engine/plan.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/engine/plan.go b/internal/engine/plan.go
index 979bec1..d9ffeb3 100644
--- a/internal/engine/plan.go
+++ b/internal/engine/plan.go
@@ -52,7 +52,7 @@ func (e *Engine) Plan(ctx context.Context, d *Dir, claims *plan.Claims) (*DirPla
Reasons: rm.Reasons,
}
}
- inputs[i] = plan.Input{File: fm.File, Rules: rules}
+ inputs[i] = plan.Input{File: fm.File, Rules: rules, NoDelete: fm.NoDelete}
}
chains := plan.Build(d.Root, inputs, e.Now(), plan.OS{}, claims)