mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Replaced UTF8String with fileSystemRepresentation and [NSString initWithUTF8String] with [NSFileManager stringWithFileSystemRepresentation:length:] as appropriate.
This commit is contained in:
1 parent
792bad502d
commit
eac4134968
4 files changed
+5
-8
No files matched your search
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user