[file-roller] ignore unknown options only for the local command line



commit 59d0d8f56c1c7d029cc00626b31672dd88926b50
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jun 20 23:31:15 2012 +0200

    ignore unknown options only for the local command line
    
    this fixed an error when calling "file-roller -a 'archive.tar.gz' '/home/user/text.txt'"
    and archive.tar.gz is wrongly added in the remaining_args vector.

 src/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 6d80ff8..695052e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -601,7 +601,6 @@ fr_application_create_option_context (void)
 
 	context = g_option_context_new (N_("- Create and modify an archive"));
 	g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
-	g_option_context_set_ignore_unknown_options (context, TRUE);
 	g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
 
 	if (g_once_init_enter (&initialized)) {
@@ -811,6 +810,7 @@ fr_application_local_command_line (GApplication   *application,
         *exit_status = 0;
 
         context = fr_application_create_option_context ();
+        g_option_context_set_ignore_unknown_options (context, TRUE);
 	if (! g_option_context_parse (context, &local_argc, &local_argv, &error)) {
 		*exit_status = EXIT_FAILURE;
 		g_critical ("Failed to parse arguments: %s", error->message);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]