Fix name search so full path is returned

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6643 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2000-06-06 22:12:39 +00:00
parent 9360b6e9cc
commit d66abe4b01
5 changed files with 17 additions and 12 deletions

View file

@ -192,8 +192,8 @@ _bundle_name_first_match(NSString* directory, NSString* name)
filelist = [[mgr directoryContentsAtPath: directory] objectEnumerator];
while ((match = [filelist nextObject]))
{
if ([path isEqual: [match stringByDeletingPathExtension]])
return match;
if ([name isEqual: [match stringByDeletingPathExtension]])
return [directory stringByAppendingPathComponent: match];
}
return nil;
@ -768,7 +768,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
while ((match = [filelist nextObject]))
{
if (allfiles || [extension isEqual: [match pathExtension]])
[resources addObject: match];
[resources addObject: [path stringByAppendingPathComponent: match]];
}
}

View file

@ -994,10 +994,10 @@ static NSMapTable *absolutes = 0;
+ (NSString*) getTimeZoneFile: (NSString *)name
{
NSString *fileName = [NSString stringWithFormat: @"%@%@", ZONES_DIR, name];
NSString *path = [NSBundle pathForGNUstepResource: fileName
NSString *dir = [NSString stringWithFormat: @"%@/%@", TIME_ZONE_DIR, ZONES_DIR];
NSString *path = [NSBundle pathForGNUstepResource: name
ofType: @""
inDirectory: TIME_ZONE_DIR];
inDirectory: dir];
return path;
}

View file

@ -31,7 +31,6 @@
#include <Foundation/NSLock.h>
#include <Foundation/NSException.h>
#include <Foundation/NSHost.h>
#include <unistd.h>
#if _AIX
#include <sys/select.h>
@ -40,6 +39,7 @@
#ifdef __WIN32__
#include <winsock.h>
#else
#include <unistd.h>
#include <netdb.h>
#include <time.h>
#include <sys/time.h>