file-roller r2531 - in trunk: . src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2531 - in trunk: . src
- Date: Sun, 21 Dec 2008 11:11:04 +0000 (UTC)
Author: paobac
Date: Sun Dec 21 11:11:03 2008
New Revision: 2531
URL: http://svn.gnome.org/viewvc/file-roller?rev=2531&view=rev
Log:
2008-12-21 Paolo Bacchilega <paobac svn gnome org>
* src/fr-command-zip.c (fr_command_zip_delete)
(fr_command_zip_extract): escape special zip characters.
Fixes bug #559481 â Can't open/view file directly from File Roller
if there is a bracket in the directory/file name.
Patch by Gerard Lommerse.
Modified:
trunk/ChangeLog
trunk/src/fr-command-zip.c
Modified: trunk/src/fr-command-zip.c
==============================================================================
--- trunk/src/fr-command-zip.c (original)
+++ trunk/src/fr-command-zip.c Sun Dec 21 11:11:03 2008
@@ -34,6 +34,7 @@
#include "fr-command-zip.h"
#define EMPTY_ARCHIVE_WARNING "Empty zipfile."
+#define ZIP_SPECIAL_CHARACTERS "[]*?!^-\\"
static void fr_command_zip_class_init (FrCommandZipClass *class);
static void fr_command_zip_init (FrCommand *afile);
@@ -274,8 +275,13 @@
fr_process_add_arg (comm->process, "-d");
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, ZIP_SPECIAL_CHARACTERS);
+ fr_process_add_arg (comm->process, escaped);
+ g_free (escaped);
+ }
fr_process_end_command (comm->process);
}
@@ -313,8 +319,13 @@
add_password_arg (comm, comm->password);
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, ZIP_SPECIAL_CHARACTERS);
+ fr_process_add_arg (comm->process, escaped);
+ g_free (escaped);
+ }
fr_process_end_command (comm->process);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]