mirror of
https://github.com/transmission/transmission
synced 2025-02-22 14:10:34 +00:00
Use tr_torrentRenamePath() instead of the removed tr_torrentRename()
This commit is contained in:
parent
afdd0866bf
commit
45c8174cc2
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue