summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsc0w <[email protected]>2015-09-25 22:29:01 +0200
committermonsta <[email protected]>2015-09-30 16:15:39 +0300
commit527a9c02376d4c3152e7f68f040e5e6e3c5887c1 (patch)
tree0eb0da7fb7d282bbc5e3bdfad057d2de9b48baf8
parent1ae87c6b4cf52c9ada44d268fe09b8b22a843db9 (diff)
downloadengrampa-527a9c02376d4c3152e7f68f040e5e6e3c5887c1.tar.bz2
engrampa-527a9c02376d4c3152e7f68f040e5e6e3c5887c1.tar.xz
unar: fix extracting archives with '[' in filename
fixes https://github.com/mate-desktop/engrampa/issues/72
-rw-r--r--src/fr-command-unarchiver.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fr-command-unarchiver.c b/src/fr-command-unarchiver.c
index d13f468..cfeb8c2 100644
--- a/src/fr-command-unarchiver.c
+++ b/src/fr-command-unarchiver.c
@@ -209,8 +209,13 @@ fr_command_unarchiver_extract (FrCommand *comm,
fr_process_add_arg (comm->process, comm->filename);
- for (scan = file_list; scan; scan = scan->next)
- fr_process_add_arg (comm->process, scan->data);
+ for (scan = file_list; scan; scan = scan->next) {
+ char *escaped;
+
+ escaped = escape_str (scan->data, "[");
+ fr_process_add_arg (comm->process, escaped);
+ g_free (escaped);
+ }
fr_process_end_command (comm->process);
}