mirror of
https://github.com/transmission/transmission
synced 2024-12-28 02:27:41 +00:00
check incomplete folder before anything else when adding a torrent
This commit is contained in:
parent
93c79adef2
commit
81f32f28d2
1 changed files with 8 additions and 7 deletions
|
@ -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
|
- (void) openFiles: (NSArray *) filenames forcePath: (NSString *) path ignoreDownloadFolder: (BOOL) ignore
|
||||||
deleteTorrentFile: (torrentFileState) deleteTorrent
|
deleteTorrentFile: (torrentFileState) deleteTorrent
|
||||||
{
|
{
|
||||||
NSString * downloadChoice = [fDefaults stringForKey: @"DownloadChoice"];
|
|
||||||
if (ignore || (!path && [downloadChoice isEqualToString: @"Ask"]))
|
|
||||||
{
|
|
||||||
[self openFilesAsk: [filenames mutableCopy] deleteTorrentFile: deleteTorrent];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#warning make submethod
|
#warning make submethod
|
||||||
if (!path && [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]
|
if (!path && [fDefaults boolForKey: @"UseIncompleteDownloadFolder"]
|
||||||
&& access([[[fDefaults stringForKey: @"IncompleteDownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
|
&& 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];
|
didEndSelector: @selector(incompleteChoiceClosed:returnCode:contextInfo:) contextInfo: dict];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSString * downloadChoice = [fDefaults stringForKey: @"DownloadChoice"];
|
||||||
|
if (ignore || (!path && [downloadChoice isEqualToString: @"Ask"]))
|
||||||
|
{
|
||||||
|
[self openFilesAsk: [filenames mutableCopy] deleteTorrentFile: deleteTorrent];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!path && [downloadChoice isEqualToString: @"Constant"]
|
if (!path && [downloadChoice isEqualToString: @"Constant"]
|
||||||
&& access([[[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
|
&& access([[[fDefaults stringForKey: @"DownloadFolder"] stringByExpandingTildeInPath] UTF8String], 0))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue