summaryrefslogtreecommitdiff
path: root/caja/caja-engrampa.c
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2015-10-04 01:23:51 +0200
committerraveit65 <[email protected]>2015-10-04 13:38:53 +0200
commit483f7b71b8692887eeec632fa44036c4a54483a3 (patch)
treedffdf680bf421750c748911ea39301bcf5397c40 /caja/caja-engrampa.c
parent64b8d470d652328835a08492821c53b9df6848f5 (diff)
downloadengrampa-1.10.tar.bz2
engrampa-1.10.tar.xz
Update caja-engrampa.c1.10
Diffstat (limited to 'caja/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);
}