Use tr_torrentRenamePath() instead of the removed tr_torrentRename()

This commit is contained in:
Mitchell Livingston 2013-01-23 03:44:47 +00:00
parent afdd0866bf
commit 45c8174cc2
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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