Bug 359255 - "Importers: Import Filters from current Eudora" (Get{Native}Target implementations for OS X) [p=beckley@qualcomm.com (Jeff Beckley) r=mento sr=mscott a1.9=damons]

git-svn-id: svn://10.0.0.236/trunk@246517 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2008-02-26 09:57:06 +00:00
parent bd52a3c7e4
commit 36b059f599

View File

@@ -938,15 +938,26 @@ NS_IMETHODIMP nsLocalFile::GetFileSizeOfLink(PRInt64 *aFileSizeOfLink)
/* readonly attribute AString target; */
NS_IMETHODIMP nsLocalFile::GetTarget(nsAString& aTarget)
{
NS_ERROR("NS_ERROR_NOT_IMPLEMENTED");
return NS_ERROR_NOT_IMPLEMENTED;
nsCAutoString nativeString;
nsresult rv = GetNativeTarget(nativeString);
if (NS_FAILED(rv))
return rv;
CopyUTF8toUTF16NFC(nativeString, aTarget);
return NS_OK;
}
/* [noscript] readonly attribute ACString nativeTarget; */
NS_IMETHODIMP nsLocalFile::GetNativeTarget(nsACString& aNativeTarget)
{
NS_ERROR("NS_ERROR_NOT_IMPLEMENTED");
return NS_ERROR_NOT_IMPLEMENTED;
if (!mTargetRef)
return NS_ERROR_NOT_INITIALIZED;
nsresult rv = NS_ERROR_FAILURE;
CFStringRef pathStrRef = ::CFURLCopyFileSystemPath(mTargetRef, kCFURLPOSIXPathStyle);
if (pathStrRef) {
rv = CFStringReftoUTF8(pathStrRef, aNativeTarget);
::CFRelease(pathStrRef);
}
return rv;
}
/* readonly attribute AString path; */