Bug 475210 - Always create a tempfile / session file for new documents
Summary: Always create a tempfile / session file for new documents
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 23.04.3
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-04 11:28 UTC by Henning
Modified: 2024-07-03 13:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning 2023-10-04 11:28:20 UTC
Afaik new documents are purely saved in RAM. Only when they are stored in a location, the live changes are stored in a tempfile in the same dir.

What happens:
I created a new file and didnt save it yet. Set the Laptop to sleep, after wakeup kscreenlock crashed, again, and I needed to force shutdown. the writing was lost on reboot, no restore dialog as there was no tempfile.

What should happen:
Always create a tempfile in the KDE config dir or somewhere else. Maybe in Home, and add it to a .hidden file or simply add a dot. This tempfile will then allow restoring any previous document, not only if a saved one has a tempfile in the same dir with some detected diffs.

This is crucial for Kates crash resistance. May have problems in the Flatpak due to portals, so saving in a Kate-specific config dir should be better to avoid any external storage write access
Comment 1 Christoph Cullmann 2024-01-20 21:25:41 UTC
Is a good idea and a valid wish, help to implement that is welcome.
Comment 2 mirh 2024-07-03 13:59:56 UTC
Duplicate of bug 274102?