Changeset 6526


Ignore:
Timestamp:
Aug 14, 2008, 9:47:23 PM (13 years ago)
Author:
livings124
Message:

remove potentially invalid tracker url's in the creator window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/CreatorWindowController.m

    r6246 r6526  
    112112            fTrackers = [[NSMutableArray alloc] initWithCapacity: 1];
    113113           
    114             //check for tracker from versions before 1.3
     114            //check for single tracker from versions before 1.3
    115115            NSString * tracker;
    116116            if ((tracker = [fDefaults stringForKey: @"CreatorTracker"]))
     
    120120                [fDefaults setObject: fTrackers forKey: @"CreatorTrackers"];
    121121            }
     122        }
     123       
     124        //remove potentially invalid addresses
     125        NSInteger i;
     126        for (i = [fTrackers count]-1; i >= 0; i--)
     127        {
     128            if (!tr_httpIsValidURL([[fTrackers objectAtIndex: i] UTF8String]))
     129                [fTrackers removeObjectAtIndex: i];
    122130        }
    123131    }
Note: See TracChangeset for help on using the changeset viewer.