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
This commit is contained in:
Ondrej Holy 2017-08-11 13:50:36 +02:00
parent 78fa67e70c
commit 087525b62b
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);
}