From cbf0bfc40b4a8e25dba400b2bac628832df4e1c6 Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Sat, 3 May 1997 17:01:57 +0000 Subject: [PATCH] ([NSCharacterSet +_bitmapForSet:number:]): Use NSBundle's pathForResource:ofType:inDirectory method properly. (Reported by Stevo Crvenkovski .) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2287 72102866-910b-0410-8b05-ffd578937521 --- Source/NSCharacterSet.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/NSCharacterSet.m b/Source/NSCharacterSet.m index 0262f75c8..eaff7a457 100644 --- a/Source/NSCharacterSet.m +++ b/Source/NSCharacterSet.m @@ -63,6 +63,7 @@ static NSLock* cache_lock = nil; { NSCharacterSet* set; NSString *path; + id csb; if (!cache_lock) cache_lock = [NSLock new]; @@ -70,15 +71,16 @@ static NSLock* cache_lock = nil; set = nil; /* Quiet warnings */ if (cache_set[number] == nil) - { - NS_DURING - path = [NSBundle pathForResource:setname + NS_DURING { + csb = [NSBundle bundleWithPath:NSCharacterSet_PATH]; + path = [csb pathForResource:setname ofType:@"dat" inDirectory:NSCharacterSet_PATH]; /* This is for testing purposes */ if (path == nil || [path length] == 0) - { - path = [NSBundle pathForResource:setname + } + csb = [NSBundle bundleWithPath:@"../NSCharacterSets"]; + path = [csb pathForResource:setname ofType:@"dat" inDirectory:@"../NSCharacterSets"]; }