WaE: 'FSResolveAliasFile' is deprecated: first deprecated in OS X 10.8
Use the bookmark API instead. Change-Id: I61fe91ea2c7287c52d45ddfee772ecfcfb5498b6
This commit is contained in:
@@ -83,23 +83,25 @@ NSString* resolveAlias( NSString* i_pSystemPath )
|
||||
kCFURLPOSIXPathStyle, false);
|
||||
if( rUrl != NULL )
|
||||
{
|
||||
FSRef rFS;
|
||||
if( CFURLGetFSRef( rUrl, &rFS ) )
|
||||
CFErrorRef rError;
|
||||
CFDataRef rBookmark = CFURLCreateBookmarkDataFromFile( NULL, rUrl, &rError );
|
||||
CFRelease( rUrl );
|
||||
if( rBookmark != NULL )
|
||||
{
|
||||
Boolean bIsFolder = false;
|
||||
Boolean bAlias = false;
|
||||
OSErr err = FSResolveAliasFile( &rFS, true, &bIsFolder, &bAlias);
|
||||
if( (err == noErr) && bAlias )
|
||||
Boolean bIsStale;
|
||||
CFURLRef rResolvedUrl = CFURLCreateByResolvingBookmarkData( kCFAllocatorDefault, rBookmark, kCFBookmarkResolutionWithoutUIMask,
|
||||
NULL, NULL, &bIsStale, &rError );
|
||||
CFRelease( rBookmark );
|
||||
if( rResolvedUrl == NULL )
|
||||
{
|
||||
CFURLRef rResolvedUrl = CFURLCreateFromFSRef( kCFAllocatorDefault, &rFS );
|
||||
if( rResolvedUrl != NULL )
|
||||
{
|
||||
pResolvedPath = (NSString*)CFURLCopyFileSystemPath( rResolvedUrl, kCFURLPOSIXPathStyle );
|
||||
CFRelease( rResolvedUrl );
|
||||
}
|
||||
CFRelease( rError );
|
||||
}
|
||||
else
|
||||
{
|
||||
pResolvedPath = (NSString*)CFURLCopyFileSystemPath( rResolvedUrl, kCFURLPOSIXPathStyle );
|
||||
CFRelease( rResolvedUrl );
|
||||
}
|
||||
}
|
||||
CFRelease( rUrl );
|
||||
}
|
||||
|
||||
return pResolvedPath;
|
||||
|
Reference in New Issue
Block a user