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

a little cleanup for the last commit

This commit is contained in:
Mitchell Livingston 2006-11-09 06:10:07 +00:00
parent ca5e8c26bc
commit e26dde8731

View file

@ -1572,17 +1572,17 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
int i;
for (i = [newNames count] - 1; i >= 0; i--)
{
if ([[[newNames objectAtIndex: i] pathExtension] caseInsensitiveCompare: @"torrent"] != NSOrderedSame)
file = [newNames objectAtIndex: i];
if ([[file pathExtension] caseInsensitiveCompare: @"torrent"] != NSOrderedSame)
[newNames removeObjectAtIndex: i];
else
[newNames replaceObjectAtIndex: i withObject: [path stringByAppendingPathComponent: [newNames objectAtIndex: i]]];
[newNames replaceObjectAtIndex: i withObject: [path stringByAppendingPathComponent: file]];
}
NSEnumerator * enumerator;
if (![[fDefaults stringForKey: @"DownloadChoice"] isEqualToString: @"Ask"])
{
enumerator = [newNames objectEnumerator];
unsigned oldCount;
while ((file = [enumerator nextObject]))
{
int count = [fTorrents count];
@ -1590,17 +1590,13 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
//check if torrent was opened
if ([fTorrents count] > count)
{
[GrowlApplicationBridge notifyWithTitle: NSLocalizedString(@"Torrent File Auto Added",
"Growl notification title") description: [file lastPathComponent]
notificationName: GROWL_AUTO_ADD iconData: nil priority: 0 isSticky: NO clickContext: nil];
}
}
}
else
{
[self openFiles: newNames];
}
//create temporary torrents to check if an import fails because of an error
enumerator = [newNames objectEnumerator];