([NSCharacterSet +_bitmapForSet:number:]): Use NSBundle's

pathForResource:ofType:inDirectory method properly.  (Reported by
Stevo Crvenkovski <stevoc@lotus.mpt.com.mk>.)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2287 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-05-03 17:01:57 +00:00
parent 721c6285df
commit cbf0bfc40b

View file

@ -63,6 +63,7 @@ static NSLock* cache_lock = nil;
{ {
NSCharacterSet* set; NSCharacterSet* set;
NSString *path; NSString *path;
id csb;
if (!cache_lock) if (!cache_lock)
cache_lock = [NSLock new]; cache_lock = [NSLock new];
@ -70,15 +71,16 @@ static NSLock* cache_lock = nil;
set = nil; /* Quiet warnings */ set = nil; /* Quiet warnings */
if (cache_set[number] == nil) if (cache_set[number] == nil)
{ NS_DURING {
NS_DURING csb = [NSBundle bundleWithPath:NSCharacterSet_PATH];
path = [NSBundle pathForResource:setname path = [csb pathForResource:setname
ofType:@"dat" ofType:@"dat"
inDirectory:NSCharacterSet_PATH]; inDirectory:NSCharacterSet_PATH];
/* This is for testing purposes */ /* This is for testing purposes */
if (path == nil || [path length] == 0) if (path == nil || [path length] == 0)
{ }
path = [NSBundle pathForResource:setname csb = [NSBundle bundleWithPath:@"../NSCharacterSets"];
path = [csb pathForResource:setname
ofType:@"dat" ofType:@"dat"
inDirectory:@"../NSCharacterSets"]; inDirectory:@"../NSCharacterSets"];
} }