summaryrefslogtreecommitdiff
path: root/src/fr-command-tar.c
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-03-20 23:06:44 +0800
committerLuke from DC <[email protected]>2023-04-23 06:27:26 +0000
commit6f49d2c72ea1ade71df33a301d5192c2a127e790 (patch)
tree4e37fe5650e092daf66aedf8346a627ead29c826 /src/fr-command-tar.c
parent872b71b88462358ab8bfe0fb83d4ce00abccb747 (diff)
downloadengrampa-6f49d2c72ea1ade71df33a301d5192c2a127e790.tar.bz2
engrampa-6f49d2c72ea1ade71df33a301d5192c2a127e790.tar.xz
command-7z: Add new 7-zip(7zz and 7zzs) project support
Diffstat (limited to 'src/fr-command-tar.c')
-rw-r--r--src/fr-command-tar.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fr-command-tar.c b/src/fr-command-tar.c
index e73b214..79c0ad0 100644
--- a/src/fr-command-tar.c
+++ b/src/fr-command-tar.c
@@ -664,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);
@@ -1061,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++) {
@@ -1088,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++) {
@@ -1125,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");