The module doc on actions.rs says files are moved
to a quarantine directory with a manifest recording original locations, so every action is reversible until the user explicitly purges quarantine.
There's no manifest. quarantine() returns a QuarantineRecord to the caller and the caller drops it — App.jsx ignores the resolved value of invoke("quarantine_finding", ...) entirely.
That makes the reversibility promise only true for as long as the app stays open, and not even then, since nothing keeps the records around. The filenames can't stand in for the manifest either: file.to_string_lossy().replace(['/', '\\', ':'], "_") maps / and _ onto the same character, so the original path can't be reconstructed from 1717000000_home_user_.cache_x.
What's needed:
- append each
QuarantineRecord to a manifest file in the quarantine dir
- a
restore Tauri command and somewhere in the UI to call it
- the "purge quarantine" step the README mentions, which doesn't exist yet either
crates/diskern-core/src/actions.rs:20
The module doc on
actions.rssays files are movedThere's no manifest.
quarantine()returns aQuarantineRecordto the caller and the caller drops it —App.jsxignores the resolved value ofinvoke("quarantine_finding", ...)entirely.That makes the reversibility promise only true for as long as the app stays open, and not even then, since nothing keeps the records around. The filenames can't stand in for the manifest either:
file.to_string_lossy().replace(['/', '\\', ':'], "_")maps/and_onto the same character, so the original path can't be reconstructed from1717000000_home_user_.cache_x.What's needed:
QuarantineRecordto a manifest file in the quarantine dirrestoreTauri command and somewhere in the UI to call itcrates/diskern-core/src/actions.rs:20