mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
small efficiency fixes from last caching change.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34478 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
209e988009
commit
de0f3b4b39
1 changed files with 4 additions and 6 deletions
|
@ -1889,10 +1889,9 @@ IF_NO_GC(
|
||||||
subPath: subPath localization: nil] objectEnumerator];
|
subPath: subPath localization: nil] objectEnumerator];
|
||||||
while ((path = [pathlist nextObject]) != nil)
|
while ((path = [pathlist nextObject]) != nil)
|
||||||
{
|
{
|
||||||
id paths = bundle_directory_readable(path);
|
NSArray *paths = bundle_directory_readable(path);
|
||||||
|
|
||||||
if ((id)[NSNull null] != paths
|
if (YES == [paths containsObject: file])
|
||||||
&& YES == [(NSArray*)paths containsObject: file])
|
|
||||||
{
|
{
|
||||||
path = [path stringByAppendingPathComponent: file];
|
path = [path stringByAppendingPathComponent: file];
|
||||||
if (YES == [mgr isReadableFileAtPath: path])
|
if (YES == [mgr isReadableFileAtPath: path])
|
||||||
|
@ -2013,7 +2012,6 @@ IF_NO_GC(
|
||||||
NSString *path;
|
NSString *path;
|
||||||
NSMutableArray *resources;
|
NSMutableArray *resources;
|
||||||
NSEnumerator *pathlist;
|
NSEnumerator *pathlist;
|
||||||
NSFileManager *mgr = manager();
|
|
||||||
|
|
||||||
pathlist = [[NSBundle _bundleResourcePathsWithRootPath: bundlePath
|
pathlist = [[NSBundle _bundleResourcePathsWithRootPath: bundlePath
|
||||||
subPath: subPath localization: localization] objectEnumerator];
|
subPath: subPath localization: localization] objectEnumerator];
|
||||||
|
@ -2023,9 +2021,9 @@ IF_NO_GC(
|
||||||
while ((path = [pathlist nextObject]))
|
while ((path = [pathlist nextObject]))
|
||||||
{
|
{
|
||||||
NSEnumerator *filelist;
|
NSEnumerator *filelist;
|
||||||
NSString *match;
|
NSString *match;
|
||||||
|
|
||||||
filelist = [[mgr directoryContentsAtPath: path] objectEnumerator];
|
filelist = [bundle_directory_readable(path) objectEnumerator];
|
||||||
while ((match = [filelist nextObject]))
|
while ((match = [filelist nextObject]))
|
||||||
{
|
{
|
||||||
if (allfiles || [extension isEqual: [match pathExtension]])
|
if (allfiles || [extension isEqual: [match pathExtension]])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue