[PATCH] tar: support the common file extensions .tlzma and .txz
Denys Vlasenko
vda.linux at googlemail.com
Wed Feb 29 17:01:30 UTC 2012
On Wed, Feb 29, 2012 at 9:28 AM, Lauri Kasanen <curaga at operamail.com> wrote:
> Hi Denys
>
> The attached patch adds support for .txz and .tlzma tar archives. For
> .txz the proper way would be to add the magic detection
The autodetection should already work, see archival/tar.c:
if (ENABLE_FEATURE_TAR_AUTODETECT
&& flags == O_RDONLY
&& get_header_ptr == get_header_tar
) {
===> tar_handle->src_fd = open_zipped(tar_filename);
if (tar_handle->src_fd < 0)
bb_perror_msg_and_die("can't
open '%s'", tar_filename);
} else {
tar_handle->src_fd = xopen(tar_filename, flags);
}
I am not convinced .txz and .tlzma extensions are common.
(In my opinion, existence of .tgz extension was a mistake).
--
vda
More information about the busybox
mailing list