file-roller r2236 - in branches/gnome-2-22: . src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2236 - in branches/gnome-2-22: . src
- Date: Sun, 13 Apr 2008 11:51:14 +0100 (BST)
Author: paobac
Date: Sun Apr 13 11:51:13 2008
New Revision: 2236
URL: http://svn.gnome.org/viewvc/file-roller?rev=2236&view=rev
Log:
2008-04-13 Paolo Bacchilega <paobac svn gnome org>
* src/fr-command-zip.c (add_password_arg): reverted for zip archives.
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/src/fr-command-zip.c
Modified: branches/gnome-2-22/src/fr-command-zip.c
==============================================================================
--- branches/gnome-2-22/src/fr-command-zip.c (original)
+++ branches/gnome-2-22/src/fr-command-zip.c Sun Apr 13 11:51:13 2008
@@ -222,16 +222,20 @@
const char *password,
gboolean always_specify)
{
- if (always_specify || ((password != NULL) && (password[0] != '\0'))) {
+ if (always_specify || ((password != NULL) && (*password != 0))) {
char *arg;
- char *quoted_arg;
-
- arg = g_strdup_printf ("-P %s", password);
- quoted_arg = g_shell_quote (arg);
+ char *e_password;
- fr_process_add_arg (comm->process, quoted_arg);
+ fr_process_add_arg (comm->process, "-P");
- g_free (quoted_arg);
+ e_password = escape_str (password, "\"*?[]'`()$!;");
+ if (e_password != NULL) {
+ arg = g_strconcat ("\"", e_password, "\"", NULL);
+ g_free (e_password);
+ } else
+ arg = g_strdup ("\"\"");
+
+ fr_process_add_arg (comm->process, arg);
g_free (arg);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]