Bug 506133 - Attachment saved to disk disappears after closing KMail
Summary: Attachment saved to disk disappears after closing KMail
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (other bugs)
Version First Reported In: unspecified
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-25 02:04 UTC by Hieu Van
Modified: 2025-06-25 02:04 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hieu Van 2025-06-25 02:04:24 UTC
SUMMARY
I recently encountered a relatively rare phenomenon: After saving an attachment to my specified folder, I attempted to open it with Okular and there was no problem. However after a few minutes (probably when I had just closed KMail), the file was gone without any trace. It was not in Trash. I also tried doing a /home-wide search and it was still nowhere to be found.

STEPS TO REPRODUCE
1. Save the attachment to a custom folder.
2. Open it (not sure if this is relevant).
3. Close KMail.

OBSERVED RESULT
The file is gone. It is not trashed, but deleted from disk.

EXPECTED RESULT
The file should have been there, precisely where it has just been saved.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 13
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
Although I have not digged deep into source code of KMail, I have observed that KMail keeps a temporary copy of the attachments. My theory is that when saving the attachment to disk, the final files might be copied from those temporary ones. Due to some reasons however, the reference to temporary files also got "redirected" to final saved files, thus causing them to be destroyed when KMail is closed.