From deed4dd36b3d0f4913a1350536dce0cd010b0549 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 3 Jun 2011 22:45:51 -0400 Subject: [PATCH] g_mkdir_with_parents: cope with dirs popping into existence Don't bail out if a directory suddenly turns out to exist after all. Proposed in bug 612729. --- glib/gfileutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gfileutils.c b/glib/gfileutils.c index ec1eddf..c0e95c0 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -102,7 +102,7 @@ g_mkdir_with_parents (const gchar *pathname, if (!g_file_test (fn, G_FILE_TEST_EXISTS)) { - if (g_mkdir (fn, mode) == -1) + if (g_mkdir (fn, mode) == -1 && errno != EEXIST) { int errno_save = errno; g_free (fn); -- 2.7.4