[evince] [comics] Properly quote commands
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evince] [comics] Properly quote commands
- Date: Tue, 22 Dec 2009 16:32:02 +0000 (UTC)
commit 9cf5791a53cbd36dc9585f0cd641eb1438f738a6
Author: Hib Eris <hib hiberis nl>
Date: Mon Dec 21 12:46:49 2009 +0100
[comics] Properly quote commands
See bgo#605146.
backend/comics/comics-document.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index b82569b..8928422 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -186,18 +186,19 @@ comics_generate_command_lines (ComicsDocument *comics_document,
GError **error)
{
gchar *quoted_file;
+ gchar *quoted_command;
ComicBookDecompressType type;
type = comics_document->command_usage;
quoted_file = g_shell_quote (comics_document->archive);
-
- comics_document->extract_command =
- g_strdup_printf (command_usage_def[type].extract,
- comics_document->selected_command);
+ quoted_command = g_shell_quote (comics_document->selected_command);
+
+ comics_document->extract_command =
+ g_strdup_printf (command_usage_def[type].extract,
+ quoted_command);
comics_document->list_command =
- g_strdup_printf (command_usage_def[type].list,
- comics_document->selected_command,
- quoted_file);
+ g_strdup_printf (command_usage_def[type].list,
+ quoted_command, quoted_file);
comics_document->offset = command_usage_def[type].offset;
if (command_usage_def[type].decompress_tmp) {
comics_document->dir = ev_mkdtemp ("evince-comics-XXXXXX", error);
@@ -208,10 +209,10 @@ comics_generate_command_lines (ComicsDocument *comics_document,
comics_document->decompress_tmp =
g_strdup_printf (command_usage_def[type].decompress_tmp,
- comics_document->selected_command,
- quoted_file,
+ quoted_command, quoted_file,
comics_document->dir);
g_free (quoted_file);
+ g_free (quoted_command);
if (!comics_decompress_temp_dir (comics_document->decompress_tmp,
comics_document->selected_command, error))
@@ -220,6 +221,7 @@ comics_generate_command_lines (ComicsDocument *comics_document,
return TRUE;
} else {
g_free (quoted_file);
+ g_free (quoted_command);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]