Bug 172018 - Use CFURLs with Mach-0 and Carbon file picker. r=sdagley/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@131569 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2988,9 +2988,9 @@ NS_IMETHODIMP nsLocalFile::InitWithCFURL(CFURLRef aCFURL)
|
||||
// Get the FSRef from the parent and the FSSpec from that
|
||||
FSRef parentFSRef;
|
||||
FSSpec parentFSSpec;
|
||||
if (::CFURLGetFSRef(parentURL, &parentFSRef) == noErr &&
|
||||
::FSGetCatalogInfo(&parentFSRef, kFSCatInfoNone,
|
||||
nsnull, nsnull, &parentFSSpec, nsnull) == noErr)
|
||||
if ((::CFURLGetFSRef(parentURL, &parentFSRef) == PR_TRUE) &&
|
||||
(::FSGetCatalogInfo(&parentFSRef, kFSCatInfoNone,
|
||||
nsnull, nsnull, &parentFSSpec, nsnull) == noErr))
|
||||
{
|
||||
// Get the leaf name of the file and turn it into a string HFS can use.
|
||||
CFStringRef fileNameRef = ::CFURLCopyLastPathComponent(aCFURL);
|
||||
|
||||
Reference in New Issue
Block a user