diff options
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 4 | ||||
-rwxr-xr-x | testsuite/cpio.tests | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index cc549cd78..5fb1ab2ae 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c | |||
@@ -69,7 +69,9 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | else if (existing_sb.st_mtime >= file_header->mtime) { | 71 | else if (existing_sb.st_mtime >= file_header->mtime) { |
72 | if (!(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)) { | 72 | if (!(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET) |
73 | && !S_ISDIR(file_header->mode) | ||
74 | ) { | ||
73 | bb_error_msg("%s not created: newer or " | 75 | bb_error_msg("%s not created: newer or " |
74 | "same age file exists", file_header->name); | 76 | "same age file exists", file_header->name); |
75 | } | 77 | } |
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests index 05b92dbe4..4cd441a60 100755 --- a/testsuite/cpio.tests +++ b/testsuite/cpio.tests | |||
@@ -116,6 +116,16 @@ link | |||
116 | " "" "" | 116 | " "" "" |
117 | SKIP= | 117 | SKIP= |
118 | 118 | ||
119 | # avoid 'not created: newer or same age file exists' message for directories | ||
120 | rm -rf cpio.testdir cpio.testdir2 2>/dev/null | ||
121 | mkdir cpio.testdir | ||
122 | testing "cpio extracts in existing directory" \ | ||
123 | "$ECHO -ne '$hexdump' | bzcat | cpio -id 2>&1; echo \$?" \ | ||
124 | "\ | ||
125 | 1 blocks | ||
126 | 0 | ||
127 | " "" "" | ||
128 | SKIP= | ||
119 | 129 | ||
120 | # Clean up | 130 | # Clean up |
121 | rm -rf cpio.testdir cpio.testdir2 2>/dev/null | 131 | rm -rf cpio.testdir cpio.testdir2 2>/dev/null |