Closed Bug 200662 Opened 22 years ago Closed 22 years ago

GetCurrentProcessDirectory can fail

Categories

(Core :: XPCOM, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ccarlen, Assigned: ccarlen)

Details

Attachments

(1 file)

Here: http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsDirectoryService.cpp#205, it's possible for bundleURL to be a compound URL, that is, one which has a base + a string portion. That's a problem because CFURLCopyFileSystemPath() will not return the absolute path for such a URL, only the string portion. The doc in the header file for CFURLCopyFileSystemPath says: "The URL is not resolved against its base before computing the path." Patch coming up which instead uses CFURLGetFileSystemRepresentation() with which you can tell it to resolve the full path. BTW, I encountered this only when playing with the CHBrowserView framework. When called from application code, it's fine. When called from code within the framework, the form of the URL we get back from the bundle is different.
Attached patch patchSplinter Review
Comment on attachment 119443 [details] [diff] [review] patch Simon, if you give it an r=/sr=, that should be enough. I'm not sure who else these days knows much about this stuff.
Attachment #119443 - Flags: superreview?(sfraser)
Comment on attachment 119443 [details] [diff] [review] patch Please add a comment in the code to say why you have to do it that way. r/sr=sfraser
Attachment #119443 - Flags: superreview?(sfraser)
Attachment #119443 - Flags: superreview+
Attachment #119443 - Flags: review+
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: