Open Bug 219151 Opened 21 years ago Updated 2 years ago

nsMsgProtocol::GetFileFromURL could be improved

Categories

(MailNews Core :: Networking, defect)

defect

Tracking

(Not tracked)

People

(Reporter: Biesinger, Unassigned)

References

()

Details

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
QA Contact: grylchan → mailnews.networking
Product: Core → MailNews Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.