Closed Bug 362396 Opened 18 years ago Closed 16 years ago

Attachments: Detaching an attachment created an invalid URL for attachment

Categories

(MailNews Core :: Attachments, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.9

People

(Reporter: mdudziak, Assigned: bugzilla.mozilla.org-3)

References

Details

(Keywords: regression)

Attachments

(1 file)

This problem is present in Windows "Version 3 alpha 1 (20061130)" and in Macintosh "Version 3 alpha1 (20061129)".

If you detach an attachment, then attempt to open the attachment from within the message, Thunderbird displays an error:

The file /path/to/file/[filename.extension]&filename=[filename.extension] cannot be found. Please check the location and try again.

Note that the leaf node, instead of containing just the filename, contains the filename, then the text "&filename=" and then the filename again.

This problem is not present in version 2.x of Thunderbird.

To reproduce:

- Send yourself an attachment (test.txt)
- Check mail (POP used in my testing)
- View message
- Detach the attachment "test.txt", saving wherever you like (Desktop)
- double-click the attachment icon in message (to open the attachment)
- Note instead of opening the attachment, you get an error in preview window.

The error shows an invalid URL. The URL ends with "test.txt&filename=test.txt" when it should end with just "test.txt".
David, this sounds like it could be related to / fall out from Bug 358657.
Blocks: 358657
yep, definitely. Maybe we can strip that off when the user tries to open the attachment
Assignee: mscott → bienvenu
(In reply to comment #2)
In fact you could use the application/x-moz-file-promise-url to supply a file name like this:
[message url]\n[file name]
Summary: Attachments: Detatching an attachment created an invalid URL for attachment → Attachments: Detaching an attachment created an invalid URL for attachment
Alternate STR:

1. Subscribe to any RSS feed with enclosures, which we do as external attachments, like http://www.actsofvolition.com/rss
2. In an entry with an attachment, try to do anything with the attachment - not only does double-clicking load it with a bogus URL, but save-as also loads it in the preview pane instead of saving.
Severity: normal → major
Flags: blocking-thunderbird3?
Keywords: regression
Attached patch Suggested fixSplinter Review
I don't know this code, so this is just a wild guess, but this appears to fix the problem for POP3 and IMAP attachments as well as for RSS enclosures.
Attachment #289163 - Flags: review?(bienvenu)
Assignee: bienvenu → nobody
Component: Mail Window Front End → MailNews: Attachments
Product: Thunderbird → Core
QA Contact: front-end → attachments
Attachment #289163 - Flags: review?(bienvenu) → review?(mscott)
Just tried the proposed fix, and I can verify that it works.
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Whiteboard: [needs review]
Reassigning to Christian, since he has kindly provided a patch.  Marking as blocking-thunderbird3+, since this is a regression with an unpleasant user-experience.
Assignee: nobody → bugzilla.mozilla.org-1
Attachment #289163 - Flags: superreview?(bienvenu)
Attachment #289163 - Flags: review?(mscott)
Attachment #289163 - Flags: review?(bienvenu)
Attachment #289163 - Flags: superreview?(bienvenu)
Attachment #289163 - Flags: superreview+
Attachment #289163 - Flags: review?(bienvenu)
Attachment #289163 - Flags: review+
Keywords: checkin-needed
fix checked in. Thx, Christian.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Whiteboard: [needs review]
Target Milestone: --- → mozilla1.9
Yay!!
Can't speak for the detached attachments, but the invalid urls in feeds are fixed.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008052803 Thunderbird/3.0a2pre ID:2008052803

Enclosures like: "X-Mozilla-External-Attachment-URL: http:xxx work fine now."

I wonder why: "This MIME attachment is stored separately from the message."
was ever implemented in the first place, if you subscribed to the feed, you surely must want to view the content.

Now if we could just get rid of that Xsite scrpting blockage for YouTube....

I can speak for the detached attachments; that case is fixed as well.
V, TB 3pre2-0621, Win2K.
Status: RESOLVED → VERIFIED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: