More correct way of turning a C-string path into an NSString.

This commit is contained in:
Uli Kusterer committed 2009-12-14 22:32:32 +01:00
1 parent fa8aaced55
commit 4c765d86ee
1 file changed
+1 -1
+1 -1
View File
@@ -119,7 +119,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
if( err == noErr )
err = FSRefMakePath( &trashRef, trashPath, MAXPATHLEN );
if( err == noErr )
tempDir = [NSString stringWithUTF8String: (char*) trashPath];
tempDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation: (char*) trashPath length: strlen((char*) trashPath)];
if( outDidFindTrash )
*outDidFindTrash = (tempDir != nil);
if( !tempDir )