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:
ccarlen%netscape.com
2002-10-09 03:58:40 +00:00
parent f472c6c25f
commit 39dc76fe3c
3 changed files with 56 additions and 107 deletions

View File

@@ -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);