mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 03:14:23 +00:00
be55400ec6
Previously the autosaved copy was only ever overwritten, never removed, so a deliberate quit (whether the user saved or chose "don't save") still nagged with a recovery prompt on next startup. Registers an atexit cleanup that removes the active IFC's autosave file(s) on a graceful interpreter shutdown. atexit never runs on an actual crash, so a genuine crash still leaves the recovery file in place as before. The cleanup reads a cached plain-string path kept up to date by reset_timer(), rather than looking it up live via bpy.context - by the time atexit fires, Blender's C++ side is torn down far enough that even a read-only bpy.context.scene access aborts the process (std::bad_optional_access) instead of raising a catchable exception. Generated with the assistance of an AI coding tool. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>