summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2015-10-04 01:23:51 +0200
committerZenWalker <[email protected]>2015-10-04 01:23:51 +0200
commit9422315606cd5a8c396bcccbd6a8d8b88a7ad8f8 (patch)
tree77a7287737d770db02b56fa07a0b7ba8f534bd23
parent8c1c9d11b221b7f07c32b89d6d5bde8892d8eb34 (diff)
downloadengrampa-9422315606cd5a8c396bcccbd6a8d8b88a7ad8f8.tar.bz2
engrampa-9422315606cd5a8c396bcccbd6a8d8b88a7ad8f8.tar.xz
Update caja-engrampa.c
-rw-r--r--caja/caja-engrampa.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/caja/caja-engrampa.c b/caja/caja-engrampa.c
index 0955201..6247609 100644
--- a/caja/caja-engrampa.c
+++ b/caja/caja-engrampa.c
@@ -38,26 +38,32 @@ static void
extract_to_callback (CajaMenuItem *item,
gpointer user_data)
{
- GList *files;
+ GList *files, *scan;
CajaFileInfo *file;
- char *uri, *default_dir;
- char *quoted_uri, *quoted_default_dir;
+ char *default_dir;
+ char *quoted_default_dir;
GString *cmd;
files = g_object_get_data (G_OBJECT (item), "files");
file = files->data;
- uri = caja_file_info_get_uri (file);
default_dir = caja_file_info_get_parent_uri (file);
- quoted_uri = g_shell_quote (uri);
quoted_default_dir = g_shell_quote (default_dir);
cmd = g_string_new ("engrampa");
- g_string_append_printf (cmd,
- " --default-dir=%s --extract %s",
- quoted_default_dir,
- quoted_uri);
+ g_string_append_printf(cmd," --default-dir=%s --extract", quoted_default_dir);
+
+ for (scan = files; scan; scan = scan->next) {
+ CajaFileInfo *file = scan->data;
+ char *uri, *quoted_uri;
+
+ uri = caja_file_info_get_uri (file);
+ quoted_uri = g_shell_quote (uri);
+ g_string_append_printf (cmd, " %s", quoted_uri);
+ g_free (uri);
+ g_free (quoted_uri);
+ }
#ifdef DEBUG
g_print ("EXEC: %s\n", cmd->str);
@@ -67,9 +73,7 @@ extract_to_callback (CajaMenuItem *item,
g_string_free (cmd, TRUE);
g_free (default_dir);
- g_free (uri);
g_free (quoted_default_dir);
- g_free (quoted_uri);
}