[file-roller: 1/4] Use correct mime type for LZO compressed TAR archives
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 1/4] Use correct mime type for LZO compressed TAR archives
- Date: Sat, 12 Oct 2019 16:07:26 +0000 (UTC)
commit 8d8a1603628f742fcb61d369444d701e7acbbb18
Author: Felix Riemann <friemann gnome org>
Date: Sat Feb 23 16:09:11 2019 +0100
Use correct mime type for LZO compressed TAR archives
Use 'application/x-tzo' instead of 'application/x-lzop-compressed-tar'.
Fixes #30.
data/supported-mime-types | 2 +-
src/fr-command-tar.c | 14 +++++++-------
src/fr-init.c | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/data/supported-mime-types b/data/supported-mime-types
index 8d0c8c72..3880f5ff 100644
--- a/data/supported-mime-types
+++ b/data/supported-mime-types
@@ -40,7 +40,6 @@ application/x-lzma;
application/x-lzma-compressed-tar;
application/x-lzop;
application/x-lz4-compressed-tar;
-application/x-lzop-compressed-tar;
application/x-ms-wim;
application/x-rar;
application/x-rar-compressed;
@@ -50,6 +49,7 @@ application/x-rzip;
application/x-rzip-compressed-tar;
application/x-tar;
application/x-tarz;
+application/x-tzo;
application/x-stuffit;
application/x-war;
application/x-xz;
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c
index 13e08f9e..2922f6bf 100644
--- a/src/fr-command-tar.c
+++ b/src/fr-command-tar.c
@@ -229,7 +229,7 @@ add_compress_arg (FrCommand *comm)
else if (_g_mime_type_matches (archive->mime_type, "application/x-xz-compressed-tar"))
fr_process_add_arg (comm->process, "--use-compress-program=xz");
- else if (_g_mime_type_matches (archive->mime_type, "application/x-lzop-compressed-tar"))
+ else if (_g_mime_type_matches (archive->mime_type, "application/x-tzo"))
fr_process_add_arg (comm->process, "--use-compress-program=lzop");
else if (_g_mime_type_matches (archive->mime_type, "application/x-7z-compressed-tar")) {
@@ -690,7 +690,7 @@ fr_command_tar_recompress (FrCommand *comm)
new_name = g_strconcat (c_tar->uncomp_filename, ".xz", NULL);
}
- else if (_g_mime_type_matches (archive->mime_type, "application/x-lzop-compressed-tar")) {
+ else if (_g_mime_type_matches (archive->mime_type, "application/x-tzo")) {
fr_process_begin_command (comm->process, "lzop");
fr_process_set_begin_func (comm->process, begin_func__recompress, comm);
switch (archive->compression) {
@@ -889,7 +889,7 @@ get_uncompressed_name (FrCommandTar *c_tar,
if (_g_filename_has_extension (e_filename, ".tar.xz"))
new_name[l - 3] = 0;
}
- else if (_g_mime_type_matches (archive->mime_type, "application/x-lzop-compressed-tar")) {
+ else if (_g_mime_type_matches (archive->mime_type, "application/x-tzo")) {
/* X.tzo --> X.tar
* X.tar.lzo --> X.tar */
if (_g_filename_has_extension (e_filename, ".tzo")) {
@@ -1060,7 +1060,7 @@ fr_command_tar_uncompress (FrCommand *comm)
fr_process_add_arg (comm->process, tmp_name);
fr_process_end_command (comm->process);
}
- else if (_g_mime_type_matches (archive->mime_type, "application/x-lzop-compressed-tar")) {
+ else if (_g_mime_type_matches (archive->mime_type, "application/x-tzo")) {
fr_process_begin_command (comm->process, "lzop");
fr_process_set_working_dir (comm->process, tmp_dir);
fr_process_set_begin_func (comm->process, begin_func__uncompress, comm);
@@ -1123,9 +1123,9 @@ const char *tar_mime_types[] = { "application/x-compressed-tar",
"application/x-lz4-compressed-tar",
"application/x-lzip-compressed-tar",
"application/x-lzma-compressed-tar",
- "application/x-lzop-compressed-tar",
"application/x-rzip-compressed-tar",
"application/x-tarz",
+ "application/x-tzo",
"application/x-xz-compressed-tar",
NULL };
@@ -1191,7 +1191,7 @@ fr_command_tar_get_capabilities (FrArchive *archive,
if (_g_program_is_available ("xz", check_command))
capabilities |= FR_ARCHIVE_CAN_READ_WRITE;
}
- else if (_g_mime_type_matches (mime_type, "application/x-lzop-compressed-tar")) {
+ else if (_g_mime_type_matches (mime_type, "application/x-tzo")) {
if (_g_program_is_available ("lzop", check_command))
capabilities |= FR_ARCHIVE_CAN_READ_WRITE;
}
@@ -1261,7 +1261,7 @@ fr_command_tar_get_packages (FrArchive *archive,
return PACKAGES ("tar,lzma");
else if (_g_mime_type_matches (mime_type, "application/x-xz-compressed-tar"))
return PACKAGES ("tar,xz");
- else if (_g_mime_type_matches (mime_type, "application/x-lzop-compressed-tar"))
+ else if (_g_mime_type_matches (mime_type, "application/x-tzo"))
return PACKAGES ("tar,lzop");
else if (_g_mime_type_matches (mime_type, "application/x-7z-compressed-tar"))
return PACKAGES ("tar,p7zip");
diff --git a/src/fr-init.c b/src/fr-init.c
index 011c1d06..5fdd44e0 100644
--- a/src/fr-init.c
+++ b/src/fr-init.c
@@ -102,7 +102,6 @@ FrMimeTypeDescription mime_type_desc[] = {
{ "application/x-lzma", ".lzma", 0 },
{ "application/x-lzma-compressed-tar", ".tar.lzma", 0 },
{ "application/x-lzop", ".lzo", 0 },
- { "application/x-lzop-compressed-tar", ".tar.lzo", 0 },
{ "application/x-ms-wim", ".wim", 0 },
{ "application/x-rar", ".rar", 0 },
{ "application/x-rpm", ".rpm", 0 },
@@ -110,6 +109,7 @@ FrMimeTypeDescription mime_type_desc[] = {
{ "application/x-rzip-compressed-tar", ".tar.rz", 0 },
{ "application/x-tar", ".tar", 0 },
{ "application/x-tarz", ".tar.Z", 0 },
+ { "application/x-tzo", ".tar.lzo", 0 },
{ "application/x-stuffit", ".sit", 0 },
{ "application/x-war", ".war", 0 },
{ "application/x-xar", ".xar", 0 },
@@ -167,7 +167,7 @@ FrExtensionType file_ext_type[] = {
{ ".tar.lz", "application/x-lzip-compressed-tar" },
{ ".tar.lz4", "application/x-lz4-compressed-tar" },
{ ".tar.lzma", "application/x-lzma-compressed-tar" },
- { ".tar.lzo", "application/x-lzop-compressed-tar" },
+ { ".tar.lzo", "application/x-tzo" },
{ ".tar.7z", "application/x-7z-compressed-tar" },
{ ".tar.rz", "application/x-rzip-compressed-tar" },
{ ".tar.xz", "application/x-xz-compressed-tar" },
@@ -180,7 +180,7 @@ FrExtensionType file_ext_type[] = {
{ ".tlz", "application/x-lzip-compressed-tar" },
{ ".tlz4", "application/x-lz4-compressed-tar" },
{ ".tzma", "application/x-lzma-compressed-tar" },
- { ".tzo", "application/x-lzop-compressed-tar" },
+ { ".tzo", "application/x-tzo" },
{ ".war", "application/x-war" },
{ ".wim", "application/x-ms-wim" },
{ ".xar", "application/x-xar" },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]