DEV Community

Tural Mustafayev
Tural Mustafayev

Posted on

How I made file moves between drives undoable and verified in a Rust desktop app

  1. the problem: my movie library on several drives, moves that half-finish, no undo
  2. the rule I set: never delete a file unless the user explicitly asks
  3. journal first: write every planned step to SQLite before touching the disk
  4. the copy: pipelined reader/writer, flush, read back past the OS cache, compare SHA-256
  5. the switch: staging folder → one rename → library points at the new place
  6. originals to the recycle bin / freedesktop trash (rename-only, never copied)
  7. undo from history, and what happens after a crash mid-move
  8. try it / contribute: https://github.com/mustafayevt/CineVault

Top comments (0)