diff --git a/NSWorkspace_RBAdditions.m b/NSWorkspace_RBAdditions.m index 15f69ccc..1ffac239 100644 --- a/NSWorkspace_RBAdditions.m +++ b/NSWorkspace_RBAdditions.m @@ -137,11 +137,8 @@ static NSString* CheckParents(io_object_t thing,NSString* part,NSMutableDictiona NSMutableDictionary* result = nil; struct statfs fs = {}; if (!statfs(ccpath,&fs)) { - NSString* from = [NSString stringWithUTF8String:fs.f_mntfromname]; - result = [NSMutableDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithUTF8String:fs.f_fstypename],NSWorkspace_RBfstypename, - [NSString stringWithUTF8String:fs.f_mntonname],NSWorkspace_RBmntonname, - nil]; + NSString* from = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:fs.f_mntfromname length:strlen(fs.f_mntfromname)]; + result = [NSMutableDictionary dictionaryWithObjectsAndKeys:[NSString stringWithUTF8String:fs.f_fstypename], NSWorkspace_RBfstypename, [[NSFileManager defaultManager] stringWithFileSystemRepresentation:fs.f_mntonname length:strlen(fs.f_mntonname)], NSWorkspace_RBmntonname, nil]; const char* devstring = "/dev/"; size_t devstringlen = 5; if (strncmp(fs.f_mntfromname,devstring,devstringlen)==0) { diff --git a/SUPipedUnarchiver.m b/SUPipedUnarchiver.m index a57a3aa5..9ad911c8 100644 --- a/SUPipedUnarchiver.m +++ b/SUPipedUnarchiver.m @@ -53,7 +53,7 @@ fp = fopen([archivePath fileSystemRepresentation], "r"); if (!fp) goto reportError; - setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] UTF8String], 1); + setenv("DESTINATION", [[archivePath stringByDeletingLastPathComponent] fileSystemRepresentation], 1); cmdFP = popen([command fileSystemRepresentation], "w"); if (!cmdFP) goto reportError; diff --git a/SUUnarchiver_Private.m b/SUUnarchiver_Private.m index dff767da..a705a0ac 100644 --- a/SUUnarchiver_Private.m +++ b/SUUnarchiver_Private.m @@ -66,7 +66,7 @@ static NSMutableArray *__unarchiverImplementations; - (NSString *)__UTI { FSRef fsRefToItem; - FSPathMakeRef((UInt8 *)[[self path] UTF8String], &fsRefToItem, NULL ); + FSPathMakeRef((UInt8 *)[[self path] fileSystemRepresentation], &fsRefToItem, NULL ); NSString *UTI = nil; LSCopyItemAttribute(&fsRefToItem, kLSRolesAll, kLSItemContentType, (CFTypeRef *)(&UTI)); diff --git a/relaunch.m b/relaunch.m index 46d52496..b98cf666 100644 --- a/relaunch.m +++ b/relaunch.m @@ -36,7 +36,7 @@ - (void) relaunch { - [[NSWorkspace sharedWorkspace] openFile:[NSString stringWithUTF8String:executablePath]]; + [[NSWorkspace sharedWorkspace] openFile:[[NSFileManager defaultManager] stringWithFileSystemRepresentation:executablePath length:strlen(executablePath)]]; [[NSFileManager defaultManager] removeFileAtPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"relaunch"] handler:nil]; exit(0); }