summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fr-command-7z.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index 316df11..20cfa2c 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -371,11 +371,20 @@ fr_command_7z_add (FrCommand *comm,
if (from_file != NULL)
fr_process_add_arg_concat (comm->process, "-i@", from_file, NULL);
+ if (from_file == NULL)
+ for (scan = file_list; scan; scan = scan->next)
+ /* Files prefixed with '@' need to be handled specially */
+ if (g_str_has_prefix (scan->data, "@"))
+ fr_process_add_arg_concat (comm->process, "-i!", scan->data, NULL);
+
fr_process_add_arg (comm->process, "--");
fr_process_add_arg (comm->process, comm->filename);
+
if (from_file == NULL)
for (scan = file_list; scan; scan = scan->next)
- fr_process_add_arg (comm->process, scan->data);
+ /* Skip files prefixed with '@', already added */
+ if (!g_str_has_prefix (scan->data, "@"))
+ fr_process_add_arg (comm->process, scan->data);
fr_process_end_command (comm->process);
}
@@ -399,11 +408,20 @@ fr_command_7z_delete (FrCommand *comm,
if (from_file != NULL)
fr_process_add_arg_concat (comm->process, "-i@", from_file, NULL);
+ if (from_file == NULL)
+ for (scan = file_list; scan; scan = scan->next)
+ /* Files prefixed with '@' need to be handled specially */
+ if (g_str_has_prefix (scan->data, "@"))
+ fr_process_add_arg_concat (comm->process, "-i!", scan->data, NULL);
+
fr_process_add_arg (comm->process, "--");
fr_process_add_arg (comm->process, comm->filename);
+
if (from_file == NULL)
for (scan = file_list; scan; scan = scan->next)
- fr_process_add_arg (comm->process, scan->data);
+ /* Skip files prefixed with '@', already added */
+ if (!g_str_has_prefix (scan->data, "@"))
+ fr_process_add_arg (comm->process, scan->data);
fr_process_end_command (comm->process);
}
@@ -453,11 +471,20 @@ fr_command_7z_extract (FrCommand *comm,
if (from_file != NULL)
fr_process_add_arg_concat (comm->process, "-i@", from_file, NULL);
+ if (from_file == NULL)
+ for (scan = file_list; scan; scan = scan->next)
+ /* Files prefixed with '@' need to be handled specially */
+ if (g_str_has_prefix (scan->data, "@"))
+ fr_process_add_arg_concat (comm->process, "-i!", scan->data, NULL);
+
fr_process_add_arg (comm->process, "--");
fr_process_add_arg (comm->process, comm->filename);
+
if (from_file == NULL)
for (scan = file_list; scan; scan = scan->next)
- fr_process_add_arg (comm->process, scan->data);
+ /* Skip files prefixed with '@', already added */
+ if (!g_str_has_prefix (scan->data, "@"))
+ fr_process_add_arg (comm->process, scan->data);
fr_process_end_command (comm->process);
}