diff options
-rw-r--r-- | archival/tar.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/tar.c b/archival/tar.c index 879f6bf6f..94fb61a29 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -507,6 +507,9 @@ static int FAST_FUNC writeFileToTarball(struct recursive_state *state, | |||
507 | if (header_name[0] == '\0') | 507 | if (header_name[0] == '\0') |
508 | return TRUE; | 508 | return TRUE; |
509 | 509 | ||
510 | if (exclude_file(tbInfo->excludeList, header_name)) | ||
511 | return SKIP; /* "do not recurse on this directory", no error message printed */ | ||
512 | |||
510 | /* It is against the rules to archive a socket */ | 513 | /* It is against the rules to archive a socket */ |
511 | if (S_ISSOCK(statbuf->st_mode)) { | 514 | if (S_ISSOCK(statbuf->st_mode)) { |
512 | bb_error_msg("%s: socket ignored", fileName); | 515 | bb_error_msg("%s: socket ignored", fileName); |
@@ -540,9 +543,6 @@ static int FAST_FUNC writeFileToTarball(struct recursive_state *state, | |||
540 | return TRUE; | 543 | return TRUE; |
541 | } | 544 | } |
542 | 545 | ||
543 | if (exclude_file(tbInfo->excludeList, header_name)) | ||
544 | return SKIP; | ||
545 | |||
546 | # if !ENABLE_FEATURE_TAR_GNU_EXTENSIONS | 546 | # if !ENABLE_FEATURE_TAR_GNU_EXTENSIONS |
547 | if (strlen(header_name) >= NAME_SIZE) { | 547 | if (strlen(header_name) >= NAME_SIZE) { |
548 | bb_simple_error_msg("names longer than "NAME_SIZE_STR" chars not supported"); | 548 | bb_simple_error_msg("names longer than "NAME_SIZE_STR" chars not supported"); |
@@ -555,13 +555,13 @@ static int FAST_FUNC writeFileToTarball(struct recursive_state *state, | |||
555 | /* open the file we want to archive, and make sure all is well */ | 555 | /* open the file we want to archive, and make sure all is well */ |
556 | inputFileFd = open_or_warn(fileName, O_RDONLY); | 556 | inputFileFd = open_or_warn(fileName, O_RDONLY); |
557 | if (inputFileFd < 0) { | 557 | if (inputFileFd < 0) { |
558 | return FALSE; | 558 | return FALSE; /* make recursive_action() return FALSE */ |
559 | } | 559 | } |
560 | } | 560 | } |
561 | 561 | ||
562 | /* Add an entry to the tarball */ | 562 | /* Add an entry to the tarball */ |
563 | if (writeTarHeader(tbInfo, header_name, fileName, statbuf) == FALSE) { | 563 | if (writeTarHeader(tbInfo, header_name, fileName, statbuf) == FALSE) { |
564 | return FALSE; | 564 | return FALSE; /* make recursive_action() return FALSE */ |
565 | } | 565 | } |
566 | 566 | ||
567 | /* If it was a regular file, write out the body */ | 567 | /* If it was a regular file, write out the body */ |