mirror of
https://github.com/transmission/transmission
synced 2024-12-23 08:13:27 +00:00
Use -[[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] in one other place.
This commit is contained in:
parent
751200f59a
commit
33b792531d
1 changed files with 4 additions and 2 deletions
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue