From c04978756471b484d49f5b60c14a8fa9ce3936f5 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 14 May 2007 21:17:10 +0000 Subject: [PATCH] fix check on the GError returned by file_utils_filename_is_uri(). 2007-05-14 Michael Natterer * app/file/file-utils.c (file_utils_filename_to_uri): fix check on the GError returned by file_utils_filename_is_uri(). svn path=/trunk/; revision=22490 --- ChangeLog | 5 +++++ app/file/file-utils.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e3e976d28..4a47d688d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-14 Michael Natterer + + * app/file/file-utils.c (file_utils_filename_to_uri): fix check on + the GError returned by file_utils_filename_is_uri(). + 2007-05-14 Michael Natterer * libgimpbase/gimpenv.c: #include , diff --git a/app/file/file-utils.c b/app/file/file-utils.c index 270663993f..c41e0f1303 100644 --- a/app/file/file-utils.c +++ b/app/file/file-utils.c @@ -100,8 +100,9 @@ file_utils_filename_to_uri (Gimp *gimp, const gchar *filename, GError **error) { - gchar *absolute; - gchar *uri; + GError *temp_error = NULL; + gchar *absolute; + gchar *uri; g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL); g_return_val_if_fail (filename != NULL, NULL); @@ -122,12 +123,14 @@ file_utils_filename_to_uri (Gimp *gimp, return NULL; } } - else if (file_utils_filename_is_uri (filename, error)) + else if (file_utils_filename_is_uri (filename, &temp_error)) { return g_strdup (filename); } - else if (error) + else if (temp_error) { + g_propagate_error (error, temp_error); + return NULL; }