diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 1999-11-05 00:31:46 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 1999-11-05 00:31:46 +0000 |
commit | be51d463ecbb35a5711087c56b9257029c8fc152 (patch) | |
tree | 980d8b0e71170aeb61c1e7ea871c7233ca31cbb6 /utility.c | |
parent | 6f170b087c83ea252fc3aff6f5ecafe0ec721fba (diff) | |
download | busybox-w32-be51d463ecbb35a5711087c56b9257029c8fc152.tar.gz busybox-w32-be51d463ecbb35a5711087c56b9257029c8fc152.tar.bz2 busybox-w32-be51d463ecbb35a5711087c56b9257029c8fc152.zip |
More stuff -- ready for release.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@75 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-rw-r--r-- | utility.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -393,7 +393,8 @@ int fullRead(int fd, char *buf, int len) | |||
393 | * | 393 | * |
394 | * Unfortunatly, while nftw(3) could replace this and reduce | 394 | * Unfortunatly, while nftw(3) could replace this and reduce |
395 | * code size a bit, nftw() wasn't supported before GNU libc 2.1, | 395 | * code size a bit, nftw() wasn't supported before GNU libc 2.1, |
396 | * and so isn't sufficiently portable to take over... | 396 | * and so isn't sufficiently portable to take over since glibc2.1 |
397 | * is so stinking huge. | ||
397 | */ | 398 | */ |
398 | int | 399 | int |
399 | recursiveAction(const char *fileName, int recurse, int followLinks, int depthFirst, | 400 | recursiveAction(const char *fileName, int recurse, int followLinks, int depthFirst, |
@@ -404,7 +405,7 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int depthFir | |||
404 | struct stat statbuf; | 405 | struct stat statbuf; |
405 | struct dirent *next; | 406 | struct dirent *next; |
406 | 407 | ||
407 | if (followLinks == FALSE) | 408 | if (followLinks == TRUE) |
408 | status = stat(fileName, &statbuf); | 409 | status = stat(fileName, &statbuf); |
409 | else | 410 | else |
410 | status = lstat(fileName, &statbuf); | 411 | status = lstat(fileName, &statbuf); |
@@ -414,6 +415,9 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int depthFir | |||
414 | return (FALSE); | 415 | return (FALSE); |
415 | } | 416 | } |
416 | 417 | ||
418 | if ( (followLinks == FALSE) && (S_ISLNK(statbuf.st_mode)) ) | ||
419 | return (TRUE); | ||
420 | |||
417 | if (recurse == FALSE) { | 421 | if (recurse == FALSE) { |
418 | if (S_ISDIR(statbuf.st_mode)) { | 422 | if (S_ISDIR(statbuf.st_mode)) { |
419 | if (dirAction != NULL) | 423 | if (dirAction != NULL) |