mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
remove potentially invalid tracker url's in the creator window
This commit is contained in:
parent
d7ab0d8a15
commit
fa2bc23cda
1 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue