remove potentially invalid tracker url's in the creator window

This commit is contained in:
Mitchell Livingston 2008-08-14 21:47:23 +00:00
parent d7ab0d8a15
commit fa2bc23cda
1 changed files with 9 additions and 1 deletions

View File

@ -111,7 +111,7 @@
{
fTrackers = [[NSMutableArray alloc] initWithCapacity: 1];
//check for tracker from versions before 1.3
//check for single tracker from versions before 1.3
NSString * tracker;
if ((tracker = [fDefaults stringForKey: @"CreatorTracker"]))
{
@ -120,6 +120,14 @@
[fDefaults setObject: fTrackers forKey: @"CreatorTrackers"];
}
}
//remove potentially invalid addresses
NSInteger i;
for (i = [fTrackers count]-1; i >= 0; i--)
{
if (!tr_httpIsValidURL([[fTrackers objectAtIndex: i] UTF8String]))
[fTrackers removeObjectAtIndex: i];
}
}
return self;
}