diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 10:15:45 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 10:15:45 +0200 |
| commit | a2cb20851499e9c00bd3bf642680a9ce3148cae8 (patch) | |
| tree | 09ef80b9662308b758a88ed2f43078c92e525f29 /internal/engine/match.go | |
| parent | 47b6776c2cb9b017ad95acb5aae8e34b8776fc7c (diff) | |
| download | krino-a2cb20851499e9c00bd3bf642680a9ce3148cae8.tar.gz krino-a2cb20851499e9c00bd3bf642680a9ce3148cae8.zip | |
gui: name the other copy of a duplicate, and offer to keep this one instead
Diffstat (limited to 'internal/engine/match.go')
| -rw-r--r-- | internal/engine/match.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/engine/match.go b/internal/engine/match.go index 59cea42..25c05e5 100644 --- a/internal/engine/match.go +++ b/internal/engine/match.go @@ -46,6 +46,13 @@ type FileMatch struct { // directory's rules use, or that check failed. Only set for a file some // matching rule would delete. NoDelete string + + // DuplicateOf is the file a (duplicate) test matched this one against, + // absolute; "" when none did. The reason text says the same thing the + // way it reads best - relative to the directory when it is inside it - + // which leaves a front end no way to act on the other copy, or even to + // say where it is (his report, 2026-09-17). + DuplicateOf string } // Result is everything Match found in one directory. @@ -190,6 +197,7 @@ func evalFile(run *matchRun, file scan.File) FileMatch { if len(run.d.DupScopes) > 0 && deletes(fm.Rules) { fm.NoDelete = noDelete(f, run.d.DupScopes) } + fm.DuplicateOf = f.DuplicateOriginal() return fm } |
