diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index fd6b23d98..b78570076 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2011-11-21 Francis Lachapelle + + * iCalTimeZone.m (+knownTimeZoneNames): ignore files that don't + have a .ics extension. + 2011-11-13 Wolfgang Sourdeau * iCalTrigger.m (-setValue:, value): removed useless accessors. diff --git a/SOPE/NGCards/iCalTimeZone.m b/SOPE/NGCards/iCalTimeZone.m index 9e645af09..4754c0793 100644 --- a/SOPE/NGCards/iCalTimeZone.m +++ b/SOPE/NGCards/iCalTimeZone.m @@ -148,8 +148,11 @@ static NSArray *knownTimeZones; if ([fm fileExistsAtPath: zonePath isDirectory: &b] && !b) { ext = [zone rangeOfString: @".ics"]; - zone = [zone substringToIndex: ext.location]; - [timeZoneNames addObject: zone]; + if (ext.location != NSNotFound) + { + zone = [zone substringToIndex: ext.location]; + [timeZoneNames addObject: zone]; + } } } }