mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
Use -[[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] in one other place.
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user