summaryrefslogtreecommitdiff
path: root/src/fr-command-tar.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-26 16:02:40 +0300
committermonsta <[email protected]>2016-01-26 16:02:40 +0300
commit162110b6004c351a4f8b758f852fa9a66f7e328b (patch)
treec7e74eb4543b9c33767e698617500908ec95ca87 /src/fr-command-tar.c
parent50df3a94d43088816c70bf6b26387033d650bc95 (diff)
downloadengrampa-162110b6004c351a4f8b758f852fa9a66f7e328b.tar.bz2
engrampa-162110b6004c351a4f8b758f852fa9a66f7e328b.tar.xz
tar: allow changing contents of .txz files (like with .tar.xz)
fixes https://github.com/mate-desktop/engrampa/issues/119
Diffstat (limited to 'src/fr-command-tar.c')
-rw-r--r--src/fr-command-tar.c10
1 files changed, 7 insertions, 3 deletions
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")) {