Commit 44372f4d authored by Philip Chimento's avatar Philip Chimento 🚮 Committed by Allison Karlitskaya

gfile: Use g_error_matches

Make proper use of g_error_matches() instead of comparing only error codes.

https://bugzilla.gnome.org/show_bug.cgi?id=719455
parent 5a7db301
......@@ -3758,7 +3758,7 @@ g_file_make_directory_with_parents (GFile *file,
return FALSE;
g_file_make_directory (file, cancellable, &my_error);
if (my_error == NULL || my_error->code != G_IO_ERROR_NOT_FOUND)
if (!g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
if (my_error)
g_propagate_error (error, my_error);
......@@ -3767,7 +3767,7 @@ g_file_make_directory_with_parents (GFile *file,
work_file = g_object_ref (file);
while (my_error != NULL && my_error->code == G_IO_ERROR_NOT_FOUND)
while (g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
GFile *parent_file;
......@@ -3786,7 +3786,7 @@ g_file_make_directory_with_parents (GFile *file,
g_object_unref (work_file);
work_file = g_object_ref (parent_file);
if (my_error != NULL && my_error->code == G_IO_ERROR_NOT_FOUND)
if (g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
list = g_list_prepend (list, parent_file); /* Transfer ownership of ref */
else
g_object_unref (parent_file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment