summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsc0w <[email protected]>2015-09-25 22:29:01 +0200
committermonsta <[email protected]>2015-09-30 15:57:05 +0300
commitc5cfaf9d672bf8f85a29921c11a09787d1c8b613 (patch)
tree99bd0da3acc3d8d19aa92db084289456f70009b5
parent5907ca9b3278737a5c42570bc187677bc341c337 (diff)
downloadengrampa-c5cfaf9d672bf8f85a29921c11a09787d1c8b613.tar.bz2
engrampa-c5cfaf9d672bf8f85a29921c11a09787d1c8b613.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);
}