Replace -[[NSURL path] fileSystemRepresentation] with just -[NSURL fileSystemRepresentation].

We're targeting a late-enough version of OS X that has that API.
This commit is contained in:
C.W. Betts 2019-07-20 14:00:19 -06:00
parent f1616c5065
commit cabffe76eb
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ NSMutableSet *creatorWindowControllerSet = nil;
fStarted = NO;
fPath = path;
fInfo = tr_metaInfoBuilderCreate([[fPath path] fileSystemRepresentation]);
fInfo = tr_metaInfoBuilderCreate([fPath fileSystemRepresentation]);
if (fInfo->fileCount == 0)
{
@ -536,7 +536,7 @@ NSMutableSet *creatorWindowControllerSet = nil;
[[self window] setRestorable: NO];
[[NSNotificationCenter defaultCenter] postNotificationName: @"BeginCreateTorrentFile" object: fLocation userInfo: nil];
tr_makeMetaInfo(fInfo, [[fLocation path] fileSystemRepresentation], trackerInfo, [fTrackers count], [[fCommentView string] UTF8String], [fPrivateCheck state] == NSOnState);
tr_makeMetaInfo(fInfo, [fLocation fileSystemRepresentation], trackerInfo, [fTrackers count], [[fCommentView string] UTF8String], [fPrivateCheck state] == NSOnState);
tr_free(trackerInfo);
fTimer = [NSTimer scheduledTimerWithTimeInterval: 0.1 target: self selector: @selector(checkProgress) userInfo: nil repeats: YES];

View File

@ -45,7 +45,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
//try to parse the torrent file
tr_info inf;
tr_ctor * ctor = tr_ctorNew(NULL);
tr_ctorSetMetainfoFromFile(ctor, [[(__bridge NSURL *)url path] fileSystemRepresentation]);
tr_ctorSetMetainfoFromFile(ctor, [(__bridge NSURL *)url fileSystemRepresentation]);
const int err = tr_torrentParse(ctor, &inf);
tr_ctorFree(ctor);
if (err)