Closed
Bug 219151
Opened 23 years ago
Closed 3 days ago
nsMsgProtocol::GetFileFromURL could be improved
Categories
(MailNews Core :: Networking, defect)
MailNews Core
Networking
Tracking
(thunderbird_esr153 wontfix, thunderbird161 wontfix)
RESOLVED
FIXED
162 Branch
People
(Reporter: Biesinger, Assigned: mkmelin)
References
()
Details
Attachments
(1 external file)
208 nsCAutoString urlSpec;
209 aURL->GetPath(urlSpec);
210 urlSpec.Insert(NS_LITERAL_CSTRING("file://"), 0);
211 nsresult rv;
212
213 // dougt - there should be an easier way!
214 nsCOMPtr<nsIURI> uri;
215 if (NS_FAILED(rv = NS_NewURI(getter_AddRefs(uri), urlSpec.get())))
216 return rv;
217
218 nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(uri);
219 if (!fileURL) return NS_ERROR_FAILURE;
220
221 return fileURL->GetFile(aResult);
222 // dougt
this looks like it could use NS_NewLocalFile insted of creating a file url, see
http://lxr.mozilla.org/seamonkey/source/xpcom/build/nsXPCOM.h#188
| Reporter | ||
Updated•23 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Updated•21 years ago
|
Product: MailNews → Core
Comment 1•19 years ago
|
||
sorry for the spam. making bugzilla reflect reality as I'm not working on these bugs. filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Updated•18 years ago
|
QA Contact: grylchan → mailnews.networking
Updated•18 years ago
|
Product: Core → MailNews Core
Still seems to be valid: https://hg.mozilla.org/comm-central/file/tip/mailnews/base/util/nsMsgProtocol.cpp#l172
Updated•4 years ago
|
Severity: normal → S3
| Assignee | ||
Comment 4•10 days ago
|
||
Yes
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
| Assignee | ||
Comment 6•10 days ago
|
||
Replace nsMsgProtocol::GetFileFromURL with NS_GetFileFromURLSpec and inline
nsMsgProtocol::OpenFileSocket into its only caller, nsMailboxProtocol::Initialize.
Add a test opening an .eml file from a non-ASCII path.
| Assignee | ||
Updated•3 days ago
|
status-thunderbird161:
--- → wontfix
status-thunderbird_esr153:
--- → wontfix
Keywords: checkin-needed-tb
Target Milestone: --- → 162 Branch
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/616cabeb826b
Simplify opening .eml files in nsMailboxProtocol. r=BenC
You need to log in
before you can comment on or make changes to this bug.
Description
•