Bug 505898 - Modify the temp folder of attachements from /tmp to /tmp/kmail
Summary: Modify the temp folder of attachements from /tmp to /tmp/kmail
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.3.3
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-21 07:52 UTC by Alexandre Bonneau
Modified: 2025-09-02 11:53 UTC (History)
0 users

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 Alexandre Bonneau 2025-06-21 07:52:28 UTC
SUMMARY
Currently, when opening temporary files from any emails, the attachement is saved in `/tmp/messageviewer_attachement_<code>`.
After a moment, the /tmp folder can display quite a lot of those folders.

STEPS TO REPRODUCE
1. Just use Kmail and open a few mail with attachements
2. Check the /tmp folder

OBSERVED RESULT
Lots of `/tmp/messageviewer_attachement_<code>` folders displayed

EXPECTED RESULT
It would be more 'clean' to create all those temporary folder inside `/tmp/kmail/messageviewer_attachement_<code>`, so that when browsing /tmp you do not see a wall of temp folders

SOFTWARE/OS VERSIONS
KDE Plasma Version: 4:6.3.5-1
Comment 1 Laurent Montel 2025-09-02 11:53:46 UTC
Git commit 1edf5bd4278904b7d82a03ab6f7e4b7adb8e5c4d by Laurent Montel.
Committed on 02/09/2025 at 11:53.
Pushed by mlaurent into branch 'master'.

Fix 505898: Modify the temp folder of attachements from /tmp to /tmp/kmail

M  +2    -1    messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp
M  +2    -1    messageviewer/src/viewer/viewer_p.cpp
M  +2    -1    mimetreeparser/src/nodehelper.cpp

https://invent.kde.org/pim/messagelib/-/commit/1edf5bd4278904b7d82a03ab6f7e4b7adb8e5c4d