Bug 515346 - kate not removing temporary swp files upon closure using "discard"
Summary: kate not removing temporary swp files upon closure using "discard"
Status: RESOLVED DUPLICATE of bug 514797
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 25.12.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-31 13:42 UTC by marcus.typ.johansson
Modified: 2026-01-31 14:07 UTC (History)
1 user (show)

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


Attachments
Reproducing the bug (440.45 KB, video/webm)
2026-01-31 13:42 UTC, marcus.typ.johansson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcus.typ.johansson 2026-01-31 13:42:18 UTC
Created attachment 189100 [details]
Reproducing the bug

SUMMARY
When opening a file, either from terminal or gui, then edit the file but do not save, instead select discard upon closing kate.
The hidden temp file is not deleted. Opening the file again _sometimes_ causes kate to show a warning at top claiming the file was not saved correctly.

STEPS TO REPRODUCE
1. open file
2. make changes
3. close file and select "discard"
4. look in folder where file is located, not hidden file created by kate
5. open file again
6. _sometimes_ get a warning about file not saved correctly

OBSERVED RESULT
The warning is very sporadic, on the side of rare and when it happens, there are no logs I can find that reports errors.
The hidden files are always there though, and in my case is backed up witch is not wanted since they are runtime files imho.
**If the warning is not shown,** the temporary file will get removed upon next opening of the file using kate.

EXPECTED RESULT
Temporary file to be removed immediately upon manual closure with "discard".

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.18.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 marcus.typ.johansson 2026-01-31 14:07:12 UTC
I did not realize the advanced search function did not sort after date, when doing so I realize this is a duplicate of https://bugs.kde.org/show_bug.cgi?id=514797

My bad.

*** This bug has been marked as a duplicate of bug 514797 ***