1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-06 19:48:15 +00:00

fix #240: make sure internally-saved torrent files are only deleted when the torrent is removed, not when quitting...hopefully this will also mean that old torrents won't remain forever in app support

This commit is contained in:
Mitchell Livingston 2007-06-29 21:25:32 +00:00
parent 0554c3f391
commit e478bee3fa
3 changed files with 8 additions and 3 deletions

View file

@ -1115,6 +1115,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
if (!lowestOrderValue || [lowestOrderValue compare: currentOrderValue] == NSOrderedDescending)
lowestOrderValue = currentOrderValue;
[torrent removeTorrent];
[fTorrents removeObject: torrent];
[fDisplayedTorrents removeObject: torrent];
}

View file

@ -75,6 +75,8 @@
- (NSDictionary *) history;
- (void) removeTorrent;
- (void) changeIncompleteDownloadFolder: (NSString *) folder;
- (void) changeDownloadFolder: (NSString *) folder;
- (NSString *) downloadFolder;

View file

@ -204,9 +204,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
if (fPublicTorrentLocation)
[fPublicTorrentLocation release];
#warning look into
tr_torrentRemoveSaved(fHandle);
[fDateAdded release];
if (fDateCompleted)
[fDateCompleted release];
@ -234,6 +231,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[super dealloc];
}
- (void) removeTorrent
{
tr_torrentRemoveSaved(fHandle);
}
- (void) changeIncompleteDownloadFolder: (NSString *) folder
{
fUseIncompleteFolder = folder != nil;