Changeset 2728
- Timestamp:
- Aug 13, 2007, 3:16:43 AM (15 years ago)
- Location:
- branches/0.8x/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.8x/macosx/Controller.h
r2594 r2728 97 97 98 98 NSMutableArray * fAutoImportedNames; 99 NSTimer * fAutoImportTimer; 100 99 101 NSMutableDictionary * fPendingTorrentDownloads; 100 NS Timer * fAutoImportTimer;102 NSMutableArray * fTempTorrentFiles; 101 103 102 104 BOOL fRemoteQuit; -
branches/0.8x/macosx/Controller.m
r2594 r2728 195 195 196 196 [fBadger release]; 197 if (fOverlayWindow) 198 [fOverlayWindow release]; 197 [fOverlayWindow release]; 199 198 [fIPCController release]; 200 199 201 if (fAutoImportedNames) 202 [fAutoImportedNames release]; 203 if (fPendingTorrentDownloads) 204 [fPendingTorrentDownloads release]; 200 [fAutoImportedNames release]; 201 [fPendingTorrentDownloads release]; 202 [fTempTorrentFiles release]; 205 203 206 204 tr_close(fLib); … … 542 540 } 543 541 542 //remove all torrent files in the temporary directory 543 if (fTempTorrentFiles) 544 { 545 NSEnumerator * torrentEnumerator = [fTempTorrentFiles objectEnumerator]; 546 NSString * path; 547 while ((path = [torrentEnumerator nextObject])) 548 [[NSFileManager defaultManager] removeFileAtPath: path handler: nil]; 549 [fTempTorrentFiles removeAllObjects]; 550 } 551 544 552 //stop timers 545 553 [fTimer invalidate]; … … 654 662 [download release]; 655 663 656 //delete torrent file if it wasn't already 657 [[NSFileManager defaultManager] removeFileAtPath: path handler: nil]; 664 //delete temp torrent file on quit 665 if (!fTempTorrentFiles) 666 fTempTorrentFiles = [[NSMutableArray alloc] init]; 667 [fTempTorrentFiles addObject: path]; 658 668 } 659 669 … … 945 955 } 946 956 957 #warning combine 947 958 - (void) openURLEndSheet: (id) sender 948 959 {
Note: See TracChangeset
for help on using the changeset viewer.