Closed
Bug 461256
Opened 16 years ago
Closed 16 years ago
saving message leaves dest file locked
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Bienvenu, Assigned: Bienvenu)
Details
Attachments
(1 file)
1.09 KB,
patch
|
standard8
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
For example, 1. select message, and pick save as .eml file. When the save as is done, TB will likely still be holding an open file handle on the file. This means that a subsequent save as will fail (perhaps there's a bug open on that already). I've tracked this down to the fact that nsMessenger::SaveAs creates an nsSaveMsgListener, which opens an output stream on the file. saveListener = new nsSaveMsgListener(localFile, this, nsnull); then, when saving a message as a .eml file, it calls rv = messageService->SaveMessageToDisk(PromiseFlatCString(aURI).get(), localFile, PR_FALSE, urlListener, nsnull, PR_TRUE, mMsgWindow); which creates its own output stream, and correctly closes it. However, nsSaveMsgListener does not close its output stream in this case, because it really is only being created to serve as nsIUrlListener, not a saveMsgListener (one who consumes the data). The fix might be to have separate constructors for nsSaveMsgListener, one that doesn't open an output stream, and one that does, or to open the output stream lazily, when needed.
Assignee | ||
Comment 1•16 years ago
|
||
don't create the output stream until we know we're going to need it. I've verified that save as html still works (it goes through this code). I saw a few issues for save as template, but I think they're unrelated to this patch.
Attachment #344397 -
Flags: superreview?(neil)
Attachment #344397 -
Flags: review?(bugzilla)
Updated•16 years ago
|
Attachment #344397 -
Flags: superreview?(neil) → superreview+
Updated•16 years ago
|
Attachment #344397 -
Flags: review?(bugzilla) → review+
Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•