mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 11:42:10 +01:00
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:
parent
e668e6e00f
commit
2d2d55b772
@ -102,7 +102,7 @@ g_mkdir_with_parents (const gchar *pathname,
|
|||||||
|
|
||||||
if (!g_file_test (fn, G_FILE_TEST_EXISTS))
|
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;
|
int errno_save = errno;
|
||||||
g_free (fn);
|
g_free (fn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user