summaryrefslogtreecommitdiff
path: root/programs/gvfs-move.c
diff options
context:
space:
mode:
authorA. Walton <awalton@svn.gnome.org>2008-03-06 11:15:59 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-03-06 11:15:59 +0000
commit824efb62afc27f5244b753c7cf971fc8402a6414 (patch)
treeaffdc786f46a48ea4247965afae9813b0313cbab /programs/gvfs-move.c
parent0f614dd019446e0a8bac1aabb11db3cb6a82b2ef (diff)
downloadgvfs-824efb62afc27f5244b753c7cf971fc8402a6414.tar.gz
Error out if the user passes invalid flags and warn the user. Fixes bug
2008-03-05 A. Walton <awalton@svn.gnome.org> * programs/gvfs-cat.c (main): * programs/gvfs-copy.c (main): * programs/gvfs-info.c (main): * programs/gvfs-ls.c (main): * programs/gvfs-move.c (main): * programs/gvfs-open.c (main): * programs/gvfs-save.c (main): * programs/gvfs-tree.c (main): Error out if the user passes invalid flags and warn the user. Fixes bug #520086. svn path=/trunk/; revision=1576
Diffstat (limited to 'programs/gvfs-move.c')
-rw-r--r--programs/gvfs-move.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/programs/gvfs-move.c b/programs/gvfs-move.c
index 6d062beb..7fab61ca 100644
--- a/programs/gvfs-move.c
+++ b/programs/gvfs-move.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include <gio/gio.h>
static gboolean progress = FALSE;
@@ -88,6 +89,17 @@ main (int argc, char *argv[])
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free (context);
+
+ if (error != NULL)
+ {
+ g_printerr ("Error parsing commandline options: %s\n", error->message);
+ g_printerr ("\n");
+ g_printerr (_("Try \"%s --help\" for more information."),
+ g_get_prgname ());
+ g_printerr ("\n");
+ g_error_free(error);
+ return 1;
+ }
if (argc <= 2)
{