diff options
Diffstat (limited to 'gio/gio-tool-trash.c')
-rw-r--r-- | gio/gio-tool-trash.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gio/gio-tool-trash.c b/gio/gio-tool-trash.c index aa4d8c3b3..7d00a5d14 100644 --- a/gio/gio-tool-trash.c +++ b/gio/gio-tool-trash.c @@ -101,8 +101,6 @@ handle_trash (int argc, char *argv[], gboolean do_help) return 1; } - g_option_context_free (context); - if (argc > 1) { int i; @@ -124,14 +122,21 @@ handle_trash (int argc, char *argv[], gboolean do_help) g_object_unref (file); } } - - if (empty) + else if (empty) { GFile *file; file = g_file_new_for_uri ("trash:"); delete_trash_file (file, FALSE, TRUE); g_object_unref (file); } + else + { + show_help (context, _("No locations given")); + g_option_context_free (context); + return 1; + } + + g_option_context_free (context); return retval; } |