From b2ad055bb54dd89f3e8748302cfbd5c6f746d6a4 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Tue, 30 Dec 2008 16:12:55 +0000 Subject: [PATCH] Show better warning message when temp file cannot be deleted. 2008-12-30 Carlos Garcia Campos * libdocument/ev-file-helpers.c: (ev_tmp_file_unlink): Show better warning message when temp file cannot be deleted. svn path=/trunk/; revision=3315 --- ChangeLog | 6 ++++++ libdocument/ev-file-helpers.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f20aa1e..dbe15511 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-30 Carlos Garcia Campos + + * libdocument/ev-file-helpers.c: (ev_tmp_file_unlink): + + Show better warning message when temp file cannot be deleted. + 2008-12-30 Carlos Garcia Campos * shell/ev-window.c: (image_save_dialog_response_cb): diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c index 34d24f0c..6a8c2568 100644 --- a/libdocument/ev-file-helpers.c +++ b/libdocument/ev-file-helpers.c @@ -169,17 +169,19 @@ void ev_tmp_file_unlink (GFile *file) { gboolean res; + GError *error = NULL; if (!file) return; - res = g_file_delete (file, NULL, NULL); + res = g_file_delete (file, NULL, &error); if (!res) { char *uri; uri = g_file_get_uri (file); - g_warning ("Unable to delete temp file %s\n", uri); + g_warning ("Unable to delete temp file %s: %s\n", uri, error->message); g_free (uri); + g_error_free (error); } } -- 2.43.5