Avoid “cannot iterate into directory” messages for nonexistent AddOns directories.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1672 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2008-06-04 17:36:51 +00:00
parent baf76050ff
commit ea6fe98212

View File

@ -177,6 +177,8 @@ static NSMutableDictionary *string_cache;
for (pathEnum = [rootPaths objectEnumerator]; (root = [pathEnum nextObject]); )
{
// Iterate over each root path's contents
if ([fmgr fileExistsAtPath:root isDirectory:&isDirectory] && isDirectory)
{
for (dirEnum = [fmgr enumeratorAtPath:root]; (subPath = [dirEnum nextObject]); )
{
// Check if it's a directory
@ -196,6 +198,7 @@ static NSMutableDictionary *string_cache;
}
}
}
}
for (pathEnum = [sExternalPaths objectEnumerator]; (path = [pathEnum nextObject]); )
{