Core: Document Recover is Greedy
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Problem description
When a file with links (aka an assembly) is open and FreeCAD crashes,
The document recovery process tries to save all its linked files.
This is wrong and creates a lot of mess during recovery.
This has been happening for a long time and has always annoyed me, but this time I finally understood the problem.
In other words, only files that were explicitly opened by the user, visible in the UI, and not yet saved should be recovered.
The other linked files, which FreeCAD opened internally for some reason but are not being edited and are not even displayed in the FreeCAD tabs, should not be offered for recovery.
I never understood why thousands of files used to appear on the `Document Recovery` since I was just working with a single assembly file opened.
### Full version info
```shell
OS: Ubuntu 25.04 (ubuntu:GNOME/ubuntu-xorg/xcb)
Architecture: x86_64
Version: 1.1.0dev.14555 (Git shallow)
Build date: 2025/09/23 18:47:15
Build type: Release
Branch: main
Hash: e9ce06155d8d47aad7d6c079bfa8ba54df2b6081
Python 3.11.13, Qt 6.8.3, Coin 4.0.3, Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.3.0, IfcOpenShell 0.8.2, OCC 7.8.1
Locale: English/United States (en_US)
Navigation Style/Orbit Style/Rotation Mode: Touchpad/Trackball/Drag at cursor
Stylesheet/Theme/QtStyle: OpenDark.qss/OpenDark/
Logical DPI/Physical DPI/Pixel Ratio: 96/94.0767/1
Installed mods:
* Assembly4.1 0.60.2-0.1
* Cables 0.2.1
* CurvesWB 0.6.64
* FreeCAD-render 2024.12.15
* Assembly4 0.60.2
* sheetmetal 0.7.55
* DynamicData 2.75.0
* Curves 0.6.70
* InventorLoader 1.5.1
* diff-tools 0.1.0
* ose-piping
* Assembly4.1_mod 0.60.2-0.1
* OpenTheme 2025.5.20
* fasteners 0.5.42
* Silk 0.2.0
* osh-autodoc-workbench 0.2.3
* CurvedShapes 1.0.13
* freecad-povray-render
* OpticsWorkbench 1.2.2
* lattice2 1.0.0
* kicadStepUpMod 11.7.6
```
### Subproject(s) affected?
Core
### Anything else?
_No response_
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.