diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 13:53:01 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-17 13:53:01 +0200 |
| commit | a80d470cbad7335fd5e534f32d935e5a49aadb24 (patch) | |
| tree | c7d92ba026ebb90dfce4ffb8cb547a1db49812b2 /internal/kwcache/kwcache.go | |
| parent | 78d8313791f05defc9e0a9f2bad8e9710f741a60 (diff) | |
| download | krino-a80d470cbad7335fd5e534f32d935e5a49aadb24.tar.gz krino-a80d470cbad7335fd5e534f32d935e5a49aadb24.zip | |
a file trashed to make room is logged the moment it is trashed
The displace was carried out first and logged only when the whole step
finished - for a copy or a cross-device move, the entire data transfer
later. A process killed in that window left the user's file in the
Trash with nothing recording it: krino log said "nothing applied" and
undo offered nothing.
It is its own action with its own line (spec ยง9), so it is now written
the moment trash.Put returns, through a hook ChainLogged calls before
the step that needed the name begins. A displace that cannot be logged
fails the step rather than compounding an unrecorded destructive act
with a second one.
Verified by killing krino -9 mid-copy with 600 MB in flight:
before: krino log "nothing applied", 0 displace lines
after: krino log "1 displaced", 1 displace line
Diffstat (limited to 'internal/kwcache/kwcache.go')
0 files changed, 0 insertions, 0 deletions
