[glib] gio-tool: Use print_file_error correctly
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio-tool: Use print_file_error correctly
- Date: Fri, 18 Aug 2017 12:47:20 +0000 (UTC)
commit 087525b62bfce2137f0f580fa5a6dcc7a294f48c
Author: Ondrej Holy <oholy redhat com>
Date: Fri Aug 11 13:50:36 2017 +0200
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 086fcf5..3947488 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 700685d..ddf085f 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]