1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 17:47:37 +00:00

check incomplete folder before anything else when adding a torrent

This commit is contained in:
Mitchell Livingston 2008-01-04 02:35:23 +00:00
parent 93c79adef2
commit 81f32f28d2

View file

@ -684,13 +684,6 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
- (void) openFiles: (NSArray *) filenames forcePath: (NSString *) path ignoreDownloadFolder: (BOOL) ignore
deleteTorrentFile: (torrentFileState) deleteTorrent
{
NSString * downloadChoice = [fDefaults stringForKey: @"DownloadChoice"];
if (ignore || (!path && [downloadChoice isEqualToString: @"Ask"]))
{
[self openFilesAsk: [filenames mutableCopy] deleteTorrentFile: deleteTorrent];
return;
}
#warning make submethod
if (!path && [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]
&& access([[[fDefaults stringForKey: @"IncompleteDownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
@ -715,6 +708,14 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
didEndSelector: @selector(incompleteChoiceClosed:returnCode:contextInfo:) contextInfo: dict];
return;
}
NSString * downloadChoice = [fDefaults stringForKey: @"DownloadChoice"];
if (ignore || (!path && [downloadChoice isEqualToString: @"Ask"]))
{
[self openFilesAsk: [filenames mutableCopy] deleteTorrentFile: deleteTorrent];
return;
}
if (!path && [downloadChoice isEqualToString: @"Constant"]
&& access([[[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
{