Second half of autosave/recovery — the read/restore side.
At startup, scan the recovery dir for session-*.beam files. Since a clean exit
deletes this session's file (on_exit), any leftover means a previous session
crashed or was killed with unsaved work. Offer the newest via a modal:
• Recover — rename it out of the session-* namespace (to recovered-*) and open
it as the current file. It's renamed, not deleted, because recovered raster
keyframes page in from it on demand; renaming also stops it being re-offered.
• Discard — delete it.
• Later — keep it for next launch, stop prompting this session.
Because a recovered file lives in the app data dir, Save behaves as Save As for
it (both the menu action and the Save-As default directory skip recovery paths),
so the work lands where the user wants rather than back in the data dir.
recovered-* files older than a week are garbage-collected at startup.
|
||
|---|---|---|
| .. | ||
| assets | ||
| examples | ||
| src | ||
| Cargo.toml | ||
| PLAN.md | ||
| TOOL_IMPLEMENTATION_PLAN.md | ||
| build.rs | ||