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.
This commit is contained in:
Matthias Clasen 2011-06-03 22:45:51 -04:00
parent 69efeee287
commit deed4dd36b

View File

@ -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);