Version: (using KDE KDE 3.5.0)
Installed from: Ubuntu Packages
As clearly seen in Bug 3212, there is the need for backup files not to show up when browsing, as they clutter the file list. On the other hand, they should be obvious to find when the need is there to restore them.
I propose to only have backup files while the application is running. As their main reason for existance is to be able to restore files after an application has crashed, its a minor advantage to have them permanently.
I imagine an application (say, Kate) to create files named e.g. "filename.txt~" and indexes them in a config file while I am editing the file. If the the file or the application is closed normally, this file and the config entry are deleted and the directory is clean again. If the application crashes, the file remains and on its next start, the application checks for existing config entries which indicate backup files that should be restored.
That way, the application can (either automatically or by asking the user through a dialog) reload the backup file, maybe after renaming it to something steady like "filename.txt.restored", or to the original filename if the user agrees with that. The remaining backup files are then deleted, or respectively renewed to backup the restored file again.
If users really close the application normally (after getting asked if they want to save it or not, in case they haven't done so), I don't see why there should still be a backup file left.
This is indeed the way KOffice autosave files work.
However backup files also serve another purpose: what if you delete the file in a file manager by mistake (or overwrite it with another file, etc. etc.)? The backup file can then be used as fallback to recover your document, although a slightly older version of it.
Closing old bugs