Skip .tab files when looking for zones.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25265 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2007-06-15 22:00:58 +00:00
parent 7ced4e5508
commit 092bd56254
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2007-06-15 Adam Fedor <fedor@gnu.org>
* Source/NSTimeZone.m ([NSTimeZone +timeZoneArray]): Skip .tab
files when looking for zones.
2007-06-14 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSNumber.m: Implement ([isEqualToValue:])

View file

@ -1593,12 +1593,11 @@ static NSMapTable *absolutes = 0;
{
NSTimeZone *zone = nil;
BOOL isDir;
// FIXME: check file validity.
path = [zonedir stringByAppendingPathComponent: name];
if ([mgr fileExistsAtPath: path isDirectory: &isDir]
&& isDir == NO)
&& isDir == NO
&& [[path pathExtension] isEqual: @"tab"] == NO)
{
zone = [zoneDictionary objectForKey: name];
if (zone == nil)
@ -1606,6 +1605,10 @@ static NSMapTable *absolutes = 0;
NSData *data;
data = [NSData dataWithContentsOfFile: path];
/* We should really make sure this is a real
zone file and not something extra that happens
to be in this directory, but initWithName:data:
will do this anyway and log a message if not. */
zone = [[self alloc] initWithName: name data: data];
AUTORELEASE(zone);
}