less: document -S flag and make it independently configurable
[oweals/busybox.git] / archival / libarchive / filter_accept_list_reassign.c
index d80f71668a30a4803fcb38be977529253e903bd4..b9acfbc05428f21650a4e4b2a3c0215f0b96a096 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "libbb.h"
-#include "archive.h"
+#include "bb_archive.h"
 
 /* Built and used only if ENABLE_DPKG || ENABLE_DPKG_DEB */
 
@@ -28,6 +28,10 @@ char FAST_FUNC filter_accept_list_reassign(archive_handle_t *archive_handle)
                name_ptr++;
 
                /* Modify the subarchive handler based on the extension */
+               if (strcmp(name_ptr, "tar") == 0) {
+                       archive_handle->dpkg__action_data_subarchive = get_header_tar;
+                       return EXIT_SUCCESS;
+               }
                if (ENABLE_FEATURE_SEAMLESS_GZ
                 && strcmp(name_ptr, "gz") == 0
                ) {
@@ -46,6 +50,12 @@ char FAST_FUNC filter_accept_list_reassign(archive_handle_t *archive_handle)
                        archive_handle->dpkg__action_data_subarchive = get_header_tar_lzma;
                        return EXIT_SUCCESS;
                }
+               if (ENABLE_FEATURE_SEAMLESS_XZ
+                && strcmp(name_ptr, "xz") == 0
+               ) {
+                       archive_handle->dpkg__action_data_subarchive = get_header_tar_xz;
+                       return EXIT_SUCCESS;
+               }
        }
        return EXIT_FAILURE;
 }