diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-12-19 06:24:08 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-12-19 06:24:08 +0000 |
commit | e5c30594f866970c37ed56a7fc36bf2d7167bdd8 (patch) | |
tree | a655709eabc453ddd518c8d0090c3b7cd2ef8219 /utility.c | |
parent | 4c21208328fef24301dc80943a4fee9c1b5c56ac (diff) | |
download | busybox-w32-e5c30594f866970c37ed56a7fc36bf2d7167bdd8.tar.gz busybox-w32-e5c30594f866970c37ed56a7fc36bf2d7167bdd8.tar.bz2 busybox-w32-e5c30594f866970c37ed56a7fc36bf2d7167bdd8.zip |
Fix tar handling of absolute paths and excluded directories.
git-svn-id: svn://busybox.net/trunk/busybox@1470 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'utility.c')
-rw-r--r-- | utility.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -663,17 +663,18 @@ int recursive_action(const char *fileName, | |||
663 | if (S_ISDIR(statbuf.st_mode)) { | 663 | if (S_ISDIR(statbuf.st_mode)) { |
664 | DIR *dir; | 664 | DIR *dir; |
665 | 665 | ||
666 | dir = opendir(fileName); | ||
667 | if (!dir) { | ||
668 | perror_msg("%s", fileName); | ||
669 | return FALSE; | ||
670 | } | ||
671 | if (dirAction != NULL && depthFirst == FALSE) { | 666 | if (dirAction != NULL && depthFirst == FALSE) { |
672 | status = dirAction(fileName, &statbuf, userData); | 667 | status = dirAction(fileName, &statbuf, userData); |
673 | if (status == FALSE) { | 668 | if (status == FALSE) { |
674 | perror_msg("%s", fileName); | 669 | perror_msg("%s", fileName); |
675 | return FALSE; | 670 | return FALSE; |
676 | } | 671 | } else if (status == SKIP) |
672 | return TRUE; | ||
673 | } | ||
674 | dir = opendir(fileName); | ||
675 | if (!dir) { | ||
676 | perror_msg("%s", fileName); | ||
677 | return FALSE; | ||
677 | } | 678 | } |
678 | while ((next = readdir(dir)) != NULL) { | 679 | while ((next = readdir(dir)) != NULL) { |
679 | char nextFile[BUFSIZ + 1]; | 680 | char nextFile[BUFSIZ + 1]; |