Closed Bug 219151 Opened 23 years ago Closed 3 days ago

nsMsgProtocol::GetFileFromURL could be improved

Categories

(MailNews Core :: Networking, defect)

defect

Tracking

(thunderbird_esr153 wontfix, thunderbird161 wontfix)

RESOLVED FIXED
162 Branch
Tracking Status
thunderbird_esr153 --- wontfix
thunderbird161 --- wontfix

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
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

Still valid?

Flags: needinfo?(mkmelin+mozilla)

Yes

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
Duplicate of this bug: 1900539

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.

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

Status: ASSIGNED → RESOLVED
Closed: 3 days ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: