Closed
Bug 309241
Opened 19 years ago
Closed 19 years ago
a tmp file should be created if open an attachment of an local eml file
Categories
(Core Graveyard :: File Handling, defect)
Core Graveyard
File Handling
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: nian.liu, Assigned: nian.liu)
Details
Attachments
(1 file, 1 obsolete file)
|
3.56 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
see 73757 When open an attachment of an local eml file, a tmp file should be created.
| Assignee | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
ok, I can't figure out where the multipart channel comes from here. I also don't think that mailnews should create file URIs in the case here. however, it probably doesn't hurt to make this code work better in this case. How about doing this the other way round, and checking whether the channel is a file channel, and only treating it like a local file then?
Hardware: PC → All
| Assignee | ||
Comment 3•19 years ago
|
||
(In reply to comment #2) > ok, I can't figure out where the multipart channel comes from here. The multipart channel comes from bug#284381. To treat an attachment of an local eml file as a local file makes that patch not work for local file. > I also don't > think that mailnews should create file URIs in the case here. > If save a eml file to local and open it, it should be, shouldn't it? > however, it probably doesn't hurt to make this code work better in this case. > How about doing this the other way round, and checking whether the channel is a > file channel, and only treating it like a local file then? I guess a file channel doesn't help here.
Comment 4•19 years ago
|
||
hm, I see... ok...
> I guess a file channel doesn't help here.
I don't understand... your nsAttachmentChannel does not implement
nsIFileChannel. So, it seems like the code here could be something like:
// In OnStartRequest
nsCOMPtr<nsIFileChannel> fileChan(do_QueryInterface(aRequest));
mIsFileChannel = fileChan != nsnull;
// In LaunchWithApplication
if (fileURL && mIsFileChannel) {
// ...
}
| Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #4) > I don't understand... your nsAttachmentChannel does not implement > nsIFileChannel. So, it seems like the code here could be something like: my fault here, It should be mChannel implement nsIFileChannel when a local file is opened, not nsAttachmentChannel. > > // In OnStartRequest > nsCOMPtr<nsIFileChannel> fileChan(do_QueryInterface(aRequest)); > mIsFileChannel = fileChan != nsnull; > > // In LaunchWithApplication > if (fileURL && mIsFileChannel) { > // ... > } >
| Assignee | ||
Comment 6•19 years ago
|
||
Attachment #196736 -
Attachment is obsolete: true
Attachment #197131 -
Flags: superreview?(cbiesinger)
Attachment #197131 -
Flags: review?(cbiesinger)
Comment 7•19 years ago
|
||
Comment on attachment 197131 [details] [diff] [review] patchv2 look good, r=biesi. but please don't move the rv declaration. however, I'm not a super-reviewer, switching that request to bz
Attachment #197131 -
Flags: superreview?(cbiesinger)
Attachment #197131 -
Flags: superreview?(bzbarsky)
Attachment #197131 -
Flags: review?(cbiesinger)
Attachment #197131 -
Flags: review+
Comment 8•19 years ago
|
||
Comment on attachment 197131 [details] [diff] [review] patchv2 With biesi's nit, looks great.
Attachment #197131 -
Flags: superreview?(bzbarsky) → superreview+
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•