diff options
Diffstat (limited to 'src/fr-command-tar.c')
-rw-r--r-- | src/fr-command-tar.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c index a430645..79c0ad0 100644 --- a/src/fr-command-tar.c +++ b/src/fr-command-tar.c @@ -137,8 +137,11 @@ process_line (char *line, } g_free (name); name = g_filename_from_utf8 (fdata->original_path, -1, NULL, NULL, NULL); - if (name) - fdata->original_path = name; + if (name) { + fdata->original_path = g_strdup (name); + fdata->free_original_path = TRUE; + } + g_free (name); if (fields[1] != NULL) fdata->link = g_strdup (fields[1]); @@ -661,7 +664,8 @@ fr_command_tar_recompress (FrCommand *comm) fr_process_add_arg (comm->process, "a"); fr_process_add_arg (comm->process, "-bd"); fr_process_add_arg (comm->process, "-y"); - fr_process_add_arg (comm->process, "-l"); + if (g_strcmp0 (comm_tar->compress_command, "7zzs") != 0 && g_strcmp0 (comm_tar->compress_command, "7zz") != 0) + fr_process_add_arg (comm->process, "-l"); new_name = g_strconcat (c_tar->uncomp_filename, ".7z", NULL); fr_process_add_arg_concat (comm->process, new_name, NULL); @@ -1003,12 +1007,12 @@ fr_command_tar_get_mime_types (FrCommand *comm) return tar_mime_types; } -static FrCommandCap +static FrCommandCaps fr_command_tar_get_capabilities (FrCommand *comm, const char *mime_type, gboolean check_command) { - FrCommandCap capabilities; + FrCommandCaps capabilities; capabilities = FR_COMMAND_CAN_ARCHIVE_MANY_FILES; @@ -1058,7 +1062,7 @@ fr_command_tar_get_capabilities (FrCommand *comm, capabilities |= FR_COMMAND_CAN_READ_WRITE; } else if (is_mime_type (mime_type, "application/x-7z-compressed-tar")) { - const char *try_command[3] = { "7za", "7zr", "7z" }; + const char *try_command[5] = { "7zzs", "7zz", "7za", "7zr", "7z" }; size_t i; for (i = 0; i < G_N_ELEMENTS (try_command); i++) { @@ -1085,7 +1089,7 @@ fr_command_tar_set_mime_type (FrCommand *comm, FR_COMMAND_CLASS (parent_class)->set_mime_type (comm, mime_type); if (is_mime_type (mime_type, "application/x-7z-compressed-tar")) { - const char *try_command[3] = { "7za", "7zr", "7z" }; + const char *try_command[5] = { "7zzs", "7zz", "7za", "7zr", "7z" }; size_t i; for (i = 0; i < G_N_ELEMENTS (try_command); i++) { @@ -1122,7 +1126,7 @@ fr_command_tar_get_packages (FrCommand *comm, else if (is_mime_type (mime_type, "application/x-lzop-compressed-tar")) return PACKAGES ("tar,lzop"); else if (is_mime_type (mime_type, "application/x-7z-compressed-tar")) - return PACKAGES ("tar,p7zip"); + return PACKAGES ("tar,7zip"); else if (is_mime_type (mime_type, "application/x-zstd-compressed-tar")) return PACKAGES ("tar,zstd"); |