Bug 377150 - Use real attachment's file name when opening an attachment
Summary: Use real attachment's file name when opening an attachment
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 5.3.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-03 08:57 UTC by Geert Janssens
Modified: 2018-10-01 12:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geert Janssens 2017-03-03 08:57:22 UTC
When opening an attachment directly from the mail, it is saved to /tmp first with a name like "messageviewer_<randomid>.pdf", and so that's the name that also will be used by the application opening the attachment.

This behaviour has changed recently. Before the temporary name was the actual name of the attachment, optionally with a number appended to it if the original name already existed in the tmp folder.

The new behaviour is rather inconvenient because the file name often has meaning. Some examples of the issues this generic naming brings with it:

- the name of the attachment you see in the e-mail has no link any more with the name of the file that is open. So it's hard to link back the open file to an e-mail. This gets more increasingly hard as you open more attachments from different e-mails.

- when opening multiple attachments it is no longer evident from the taskbar which file is which because they are all named 'messageviewer_xyz.ext' Switching files from the taskbar after several are open has become a hit and miss.

- when you have opened an attachment, you may decide to resave it (to a location other than tmp) directly from the application that is used to open the attachment (libreoffice or okular for example). You typically do this by using "Save as". However the proposed name in that dialog is now 'messageviewer_xyz.ext' rather than the much more descriptive name the attachment originally had in the mail.
Comment 1 Andy Goss 2017-03-04 05:11:21 UTC
I confirm this, it applies at least to PDF files, plus .doc and .odt files created by Libre Office.

In addition, on Wednesday I received a .doc attachment that Libre Office opened with a filename of "untitled 1". And it still does today (as do .doc/.odt attachments to older emails), when attachments sent today open as "messageviewer_<*>" 

As far back as I can go PDF files want to save as "messageviewer_<*>".
Comment 2 Geert Janssens 2018-10-01 09:23:14 UTC
I'm not seeing this issue any more with more recent versions of KMail (currently running 5.7.3). So as far as I'm concerned this bug is now fixed.
Comment 3 Christophe Marin 2018-10-01 12:31:38 UTC
Thanks for keeping us informed.