From 162110b6004c351a4f8b758f852fa9a66f7e328b Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 26 Jan 2016 16:02:40 +0300 Subject: tar: allow changing contents of .txz files (like with .tar.xz) fixes https://github.com/mate-desktop/engrampa/issues/119 --- src/fr-command-tar.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/fr-command-tar.c') diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c index fea3f03..b870ec5 100644 --- a/src/fr-command-tar.c +++ b/src/fr-command-tar.c @@ -795,9 +795,13 @@ get_uncompressed_name (FrCommandTar *c_tar, new_name[l - 5] = 0; } else if (is_mime_type (comm->mime_type, "application/x-xz-compressed-tar")) { - /* X.tar.xz --> X.tar - * (There doesn't seem to be a shorthand suffix) */ - if (file_extension_is (e_filename, ".tar.xz")) + /* X.txz --> X.tar + * X.tar.xz --> X.tar */ + if (file_extension_is (e_filename, ".txz")) { + new_name[l - 2] = 'a'; + new_name[l - 1] = 'r'; + } + else if (file_extension_is (e_filename, ".tar.xz")) new_name[l - 3] = 0; } else if (is_mime_type (comm->mime_type, "application/x-lzop-compressed-tar")) { -- cgit v1.2.1