mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
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
This commit is contained in:
committed by
Matthias Clasen
parent
732470a359
commit
5291190f46
@@ -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);
|
||||
|
Reference in New Issue
Block a user