mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* Source/NSBundle.m (addBundlePath): Handle nested subdirectories
(e.g. [NSBundle pathForLibraryResource: @"Generic-PostScript_Printer-Postscript" ofType: @"ppd" inDirectory: @"PostScript/PPD"] was previously failing.) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34555 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e466ab2a40
commit
43ee7044e6
2 changed files with 20 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
|||
2012-01-16 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSBundle.m (addBundlePath): Handle nested subdirectories
|
||||
(e.g.
|
||||
[NSBundle pathForLibraryResource: @"Generic-PostScript_Printer-Postscript"
|
||||
ofType: @"ppd"
|
||||
inDirectory: @"PostScript/PPD"] was previously failing.)
|
||||
|
||||
2012-01-12 10:10 theraven
|
||||
|
||||
* libs/base/trunk/Headers/Foundation/NSException.h: Tweak the
|
||||
|
|
|
@ -399,14 +399,19 @@ addBundlePath(NSMutableArray *list, NSArray *contents,
|
|||
}
|
||||
if (nil != subdir)
|
||||
{
|
||||
if (NO == [contents containsObject: subdir])
|
||||
NSEnumerator *e = [[subdir pathComponents] objectEnumerator];
|
||||
NSString *subdirComponent;
|
||||
while ((subdirComponent = [e nextObject]) != nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
path = [path stringByAppendingPathComponent: subdir];
|
||||
if (nil == (contents = bundle_directory_readable(path)))
|
||||
{
|
||||
return;
|
||||
if (NO == [contents containsObject: subdirComponent])
|
||||
{
|
||||
return;
|
||||
}
|
||||
path = [path stringByAppendingPathComponent: subdirComponent];
|
||||
if (nil == (contents = bundle_directory_readable(path)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nil != lang)
|
||||
|
|
Loading…
Reference in a new issue