Skip to content

Quarantined files can't be restored after the app is closed #43

Description

@Muawiya-contact

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureWorkspace layout and engine designbugSomething isn't workinghelp wantedExtra attention is neededsafetyTouches the read-only / quarantine guarantees

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions