From 087525b62bfce2137f0f580fa5a6dcc7a294f48c Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Fri, 11 Aug 2017 13:50:36 +0200 Subject: [PATCH] gio-tool: Use print_file_error correctly Use print_file_error where an error relates to that file and vice versa. https://bugzilla.gnome.org/show_bug.cgi?id=786463 --- gio/gio-tool-cat.c | 2 +- gio/gio-tool-save.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gio/gio-tool-cat.c b/gio/gio-tool-cat.c index 086fcf5a4..394748815 100644 --- a/gio/gio-tool-cat.c +++ b/gio/gio-tool-cat.c @@ -84,7 +84,7 @@ cat (GFile *file) if (written == -1 && errsv != EINTR) { - print_file_error (file, _("Error writing to stdout")); + print_error ("%s", _("Error writing to stdout")); success = FALSE; goto out; } diff --git a/gio/gio-tool-save.c b/gio/gio-tool-save.c index 700685d15..ddf085f09 100644 --- a/gio/gio-tool-save.c +++ b/gio/gio-tool-save.c @@ -102,7 +102,7 @@ save (GFile *file) if (error != NULL) { save_res = FALSE; - print_error ("%", error->message); + print_file_error (file, error->message); g_clear_error (&error); goto out; } @@ -123,7 +123,7 @@ save (GFile *file) if (!close_res) { save_res = FALSE; - print_error ("%s", error->message); + print_file_error (file, error->message); g_error_free (error); } -- 2.11.4.GIT