mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
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]
This commit is contained in:
parent
4b12e99c60
commit
cedb021afa
@ -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; */
|
||||
|
Loading…
Reference in New Issue
Block a user