Fix recursion

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4450 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-06-21 10:51:38 +00:00
parent ddd1dc8478
commit d151a09f46
2 changed files with 6 additions and 2 deletions

View file

@ -1243,7 +1243,7 @@ static NSFileManager* defaultManager = nil;
// Do not follow links
if (!flags.isFollowing)
{
if (!lstat(cpath, &statbuf))
if (lstat(cpath, &statbuf) != 0)
break;
// If link then return it as link
if (S_IFLNK == (S_IFMT & statbuf.st_mode))
@ -1251,7 +1251,7 @@ static NSFileManager* defaultManager = nil;
}
else
{
if (!stat(cpath, &statbuf))
if (stat(cpath, &statbuf) != 0)
break;
}
if (S_IFDIR == (S_IFMT & statbuf.st_mode))