nsMsgProtocol::GetFileFromURL could be improved

NEW
Unassigned

Status

15 years ago
a year ago

People

(Reporter: Biesinger, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

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
OS: Windows 2000 → All
Hardware: PC → All
Product: MailNews → Core
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

10 years ago
QA Contact: grylchan → mailnews.networking
(Assignee)

Updated

10 years ago
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.