From 45c8174cc2d89a9a3d76abe75929b353fd538d07 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 23 Jan 2013 03:44:47 +0000 Subject: [PATCH] Use tr_torrentRenamePath() instead of the removed tr_torrentRename() --- libtransmission/transmission.h | 2 +- macosx/Torrent.m | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtransmission/transmission.h b/libtransmission/transmission.h index 7a980e3cb..a6e3e0a37 100644 --- a/libtransmission/transmission.h +++ b/libtransmission/transmission.h @@ -1109,7 +1109,7 @@ typedef void (tr_torrent_rename_done_func)(tr_torrent * torrent, * @callback: the callback invoked when the renaming finishes, or NULL * @callback_data: the pointer to pass in the callback's user_data arg * - * As a special case, renaming the root file in a torrent will allso + * As a special case, renaming the root file in a torrent will also * update tr_info.name. * * EXAMPLES diff --git a/macosx/Torrent.m b/macosx/Torrent.m index fcb29dd27..7851f28e5 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -849,7 +849,7 @@ int trashDataFile(const char * filename) NSDictionary * contextInfo = [@{ @"Nodes" : fFileList, @"CompletionHandler" : [[completionHandler copy] autorelease] } retain]; - tr_torrentRename(fHandle, [newName UTF8String], renameCallback, contextInfo); + tr_torrentRenamePath(fHandle, fInfo->name, [newName UTF8String], renameCallback, contextInfo); } - (void) renameFileNode: (FileListNode *) node withName: (NSString *) newName completionHandler: (void (^)(BOOL didRename)) completionHandler @@ -861,8 +861,8 @@ int trashDataFile(const char * filename) NSDictionary * contextInfo = [@{ @"Nodes" : @[ node ], @"CompletionHandler" : [[completionHandler copy] autorelease] } retain]; - NSString * oldName = [[node path] stringByAppendingPathComponent: [node name]]; - tr_torrentRenamePath(fHandle, [oldName UTF8String], [newName UTF8String], renameCallback, contextInfo); + NSString * oldPath = [[node path] stringByAppendingPathComponent: [node name]]; + tr_torrentRenamePath(fHandle, [oldPath UTF8String], [newName UTF8String], renameCallback, contextInfo); } - (CGFloat) progress -- 2.40.0