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

@ -1,3 +1,7 @@
Mon Jun 21 12:05:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSFileManager.m: Fixed error recursing into directory.
Mon Jun 21 9:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk> Mon Jun 21 9:45:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Mostly updates of range checking code and change of FastArray and Mostly updates of range checking code and change of FastArray and

View file

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