Changeset 14017
- Timestamp:
- Feb 11, 2013, 1:47:51 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Torrent.m
r14016 r14017 95 95 void renameCallback(tr_torrent * torrent, const char * oldPathCharString, const char * newNameCharString, int error, void * contextInfo) 96 96 { 97 @autoreleasepool 98 { 97 @autoreleasepool { 99 98 NSString * oldPath = [NSString stringWithUTF8String: oldPathCharString]; 100 99 NSString * newName = [NSString stringWithUTF8String: newNameCharString]; 101 100 102 NSDictionary * contextDict = [(NSDictionary *)contextInfo autorelease]; 103 Torrent * torrentObject = [contextDict objectForKey: @"Torrent"]; 104 [torrentObject renameFinished: error == 0 withNodes: [contextDict objectForKey: @"Nodes"] completionHandler: [contextDict objectForKey: @"CompletionHandler"] oldPath: oldPath newName: newName]; 101 dispatch_async(dispatch_get_main_queue(), ^{ 102 NSDictionary * contextDict = [(NSDictionary *)contextInfo autorelease]; 103 Torrent * torrentObject = [contextDict objectForKey: @"Torrent"]; 104 [torrentObject renameFinished: error == 0 withNodes: [contextDict objectForKey: @"Nodes"] completionHandler: [contextDict objectForKey: @"CompletionHandler"] oldPath: oldPath newName: newName]; 105 }); 105 106 } 106 107 }
Note: See TracChangeset
for help on using the changeset viewer.