From 5291190f46614c9e1491599af345f9c41c74967e Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Tue, 14 Aug 2012 11:20:16 -0400 Subject: [PATCH] g_file_make_directory_with_parents(): fix a corner case If g_file_get_parent() unexpectedly failed, we could return FALSE but with no error. https://bugzilla.gnome.org/show_bug.cgi?id=680823 --- gio/gfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gio/gfile.c b/gio/gfile.c index 68207ac..92776af 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -3384,11 +3384,12 @@ g_file_make_directory_with_parents (GFile *file, { GFile *parent_file; - g_clear_error (&my_error); - parent_file = g_file_get_parent (work_file); if (parent_file == NULL) break; + + g_clear_error (&my_error); + result = g_file_make_directory (parent_file, cancellable, &my_error); g_object_unref (work_file); -- 2.7.4