From 33b792531d332b3700fb67838b82b98ce6fc35d7 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Sun, 28 Jul 2019 16:13:57 -0600 Subject: [PATCH] Use -[[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] in one other place. --- macosx/Controller.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 4df652d46..6febda0ef 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -4581,8 +4581,10 @@ static void removeKeRangerRansomware() - (void) rpcAddTorrentStruct: (struct tr_torrent *) torrentStruct { NSString * location = nil; - if (tr_torrentGetDownloadDir(torrentStruct) != NULL) - location = @(tr_torrentGetDownloadDir(torrentStruct)); + if (tr_torrentGetDownloadDir(torrentStruct) != NULL) { + const char * tmpLoc = tr_torrentGetDownloadDir(torrentStruct); + location = [[NSFileManager defaultManager] stringWithFileSystemRepresentation: tmpLoc length: strlen(tmpLoc)]; + } Torrent * torrent = [[Torrent alloc] initWithTorrentStruct: torrentStruct location: location lib: fLib];