forked from 1b-agent/opencadstudio-upstream
feat(io): delete .sv$ autosave files on clean save/exit (#205)
The .sv$ recovery copies only need to survive a crash, so they are removed on a clean save (Save and Save-As both delete the file's .sv$ after writing) and on a clean exit — a new exit_app() runs cleanup_autosaves over every open tab before quitting, and all iced::exit() paths now funnel through it. A leftover .sv$ therefore signals an unclean shutdown, i.e. something to recover. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
02d2764e45
commit
286caa9c61
4 files changed
+27
-6
No files matched your search
@@ -809,7 +809,7 @@ impl OpenCADStudio {
|
||||
self.pending_close = Some(super::PendingClose::Quit);
|
||||
return self.open_unsaved_dialog_window();
|
||||
}
|
||||
return iced::exit();
|
||||
return self.exit_app();
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
@@ -818,7 +818,7 @@ impl OpenCADStudio {
|
||||
// Only the main window exists now; all dialogs are in-canvas
|
||||
// modals (Plan B). Closing it exits.
|
||||
if self.main_window == Some(id) {
|
||||
return iced::exit();
|
||||
return self.exit_app();
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user