mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fixed [NSBundle bundleForLibrary: @"gnustep-base"];
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24883 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7dcbcdd921
commit
a789e3ec4b
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-03-17 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* Source/NSBundle.m ([+bundleForLibrary:version:]): Fixed looking
|
||||
up library resource bundle when no version is provided.
|
||||
|
||||
2007-03-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/unix/NSStream.m:
|
||||
|
|
|
@ -2273,14 +2273,19 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
/* Any version will do. */
|
||||
NSString *versionsPath = [[path stringByAppendingPathComponent: libraryName]
|
||||
stringByAppendingPathComponent: @"Versions"];
|
||||
|
||||
if ([fm fileExistsAtPath: versionsPath isDirectory: &isDir] && isDir)
|
||||
{
|
||||
/* TODO: Ignore subdirectories. */
|
||||
NSEnumerator *fileEnumerator = [fm enumeratorAtPath: versionsPath];
|
||||
NSString *potentialPath;
|
||||
|
||||
while ((potentialPath = [fileEnumerator nextObject]) != nil)
|
||||
{
|
||||
potentialPath = [potentialPath stringByAppendingPathComponent: @"Resources"];
|
||||
potentialPath = [versionsPath
|
||||
stringByAppendingPathComponent:
|
||||
[potentialPath
|
||||
stringByAppendingPathComponent: @"Resources"]];
|
||||
if ([fm fileExistsAtPath: potentialPath isDirectory: &isDir] && isDir)
|
||||
{
|
||||
b = [self bundleWithPath: potentialPath];
|
||||
|
|
Loading…
Reference in a new issue