avoid 'not created: newer or same age file exists' message for directories --- busybox-1.17.1/archival/libunarchive/data_extract_all.c +++ busybox-1.17.1/archival/libunarchive/data_extract_all.c @@ -69,7 +69,8 @@ } } else if (existing_sb.st_mtime >= file_header->mtime) { - if (!(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET)) { + if (!(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET) + && (file_header->mode & S_IFMT) != S_IFDIR) { bb_error_msg("%s not created: newer or " "same age file exists", file_header->name); } --- busybox-1.17.1/testsuite/cpio.tests +++ busybox-1.17.1/testsuite/cpio.tests @@ -114,6 +114,16 @@ " "" "" SKIP= +# avoid 'not created: newer or same age file exists' message for directories +rm -rf cpio.testdir cpio.testdir2 2>/dev/null +mkdir cpio.testdir +testing "cpio extracts in existing directory" \ +"$ECHO -ne '$hexdump' | bzcat | cpio -id 2>&1; echo \$?" \ +"\ +1 blocks +0 +" "" "" +SKIP= # Clean up rm -rf cpio.testdir cpio.testdir2 2>/dev/null