Closed
Bug 1411185
Opened 7 years ago
Closed 3 years ago
If only message part is an attachment, attachment gets saved with incorrect name (folder name for local folder and fetchUID.INBOX... for IMAP) - see comment #10
Categories
(MailNews Core :: MIME, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1528932
People
(Reporter: paolo, Unassigned)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Steps to reproduce:
Saving an attached image (tiff) dragging it directly to a folder on my desktop (Windows 10)
Actual results:
Thunderbird create a fetchUID.INBOX54788 file in that folder instead of regular Tiff file.
If I rename that file with Tiff estension I can open it without problems.
Expected results:
Saving the image with correct name and extension.
Comment 1•7 years ago
|
||
Interesting. You're using an IMAP account, I assume, since "fetch" and "UID" are used in IMAP. Does this happen with add-ons disabled? See Help menu.
Reporter | ||
Comment 2•7 years ago
|
||
Yes, Imap account. I have no add-ons installed. All maintenance tasks done, like compatting and folder repair.
Regards
Paolo Rossi
Comment 4•7 years ago
|
||
Does normal save-as for that file work ok? I mean without dragging.
Reporter | ||
Comment 5•7 years ago
|
||
Yes, save as works normally.
Reporter | ||
Comment 6•7 years ago
|
||
I tried under Windows 7, same problem.
I tried under MacOS and dragging works normally, no problem.
I don't know if it help.
Comment 7•7 years ago
|
||
More questions: Does that only happen for images or also other attachments? Does it happen when you start Windows in safe mode? Does it happen for all messages with attached images or just a single or a few messages?
Reporter | ||
Comment 8•7 years ago
|
||
1) Ok.. I try with many other emails with attached file like pdf, docx, xls, jpg, png.. NO problems..
2) I resend to myself with Outlook an email with the same tiff image previously saved with save-as.. and NOW it works!.. I can drag the attached file without any problem.
Maybe ther is something wrong inside the original email. I'll attach a zipped saved email.
Reporter | ||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Thanks, this clarifies the issue. The problem is that the message doesn't contain any text body, it only contains an image part. These are the headers:
From: Amalia <xxx@xxx.com>
Content-Type: image/tiff; x-unix-mode=0644; name="foto amalia.tiff"
Content-Transfer-Encoding: base64
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject:
Message-Id: <951C7891-0378-41D8-B322-26EDCFB6FDB4@kurkchieva.com>
Date: Tue, 24 Oct 2017 09:35:49 +0200
To: Paolo <yyy@yyy.eu>
Content-Disposition: inline; filename="foto amalia.tiff"
X-Mailer: Apple Mail (2.3273)
TU0AKgACRKSAP+BACCQWDQeEQmFQuGQ2HQ+IRGJROKRWLReMRmNRuOR2PR+QSGRSOSSWTSeUSmVS
uWS2XQuBP+XzOaTWbTecTmdTueT2fT+gUGhUOTTGiUekUmlUumU2nU+oVGpVOOUaqVesVmtVuuV2
...
In this case TB doesn't use the filename when dragging the file out onto the desktop.
Alfred, care to take a look where in MIME that problem is caused?
Status: UNCONFIRMED → NEW
Component: Untriaged → MIME
Ever confirmed: true
Flags: needinfo?(gds) → needinfo?(infofrommozilla)
OS: Unspecified → All
Product: Thunderbird → MailNews Core
Hardware: Unspecified → All
Summary: Dragging attached image in Imap account to a folder on PC will result in fetchUID.INBOXxxx file → If only message part is an attachment, attachment gets saved with incorrect name (folder name for local folder and fetchUID.INBOX... for IMAP) - see comment #10
Version: 52 Branch → 52
Comment 11•7 years ago
|
||
BTW, I noticed those wrong file names when working on bug 1361422.
Comment 12•7 years ago
|
||
Jorg K (GMT+2) from comment #10)
> Alfred, care to take a look where in MIME that problem is caused?
In a normal multipart message, the name of the attachment is appended here as an addition to the URI:
<https://dxr.mozilla.org/comm-central/rev/97bf29612932b32707ddd6838047d364947eca13/mailnews/mime/src/mimemrel.cpp#522>
Here, this addition is stored in mAttachmentFileName.
<https://dxr.mozilla.org/comm-central/rev/97bf29612932b32707ddd6838047d364947eca13/mailnews/base/util/nsMsgMailNewsUrl.cpp#409>
mAttachmentFileName will later be used when saving the file.
But this is no multipart message. Therefore, the name was never parsed or stored.
And if mAttachmentFileName is't set, the IMAP-Folder+UID is used as filename.
Flags: needinfo?(infofrommozilla)
Comment 13•7 years ago
|
||
Thanks for the analysis so far. Where does the
> And if mAttachmentFileName isn't set, the IMAP-Folder+UID is used as filename.
happen? Any chance to get the real filename then?
Non-multipart messages a surely also parsed in some way. Can we pick up the filename then?
Flags: needinfo?(infofrommozilla)
Updated•5 years ago
|
Flags: needinfo?(infofrommozilla)
Comment 14•3 years ago
|
||
I've created a simplified sample email.
With TB78.13:
- Save As: works fine
- Drag&Drop: is broken - The name becomes <IMAP-folder name>+<UID>
With TB91.03:
- Both cases works fine for me!
This was fixed for sure by bug 1528932
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•