From 4c765d86ee58e9cdb748e8bb934c45520f34d47d Mon Sep 17 00:00:00 2001 From: Uli Kusterer Date: Mon, 14 Dec 2009 22:32:32 +0100 Subject: [PATCH] More correct way of turning a C-string path into an NSString. --- SUPlainInstallerInternals.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPlainInstallerInternals.m b/SUPlainInstallerInternals.m index f38ae5b6..1849ce25 100644 --- a/SUPlainInstallerInternals.m +++ b/SUPlainInstallerInternals.m @@ -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 )