[glib/glib-2-28] g_mkdir_with_parents: cope with dirs popping into existence
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-28] g_mkdir_with_parents: cope with dirs popping into existence
- Date: Sun, 5 Jun 2011 17:43:45 +0000 (UTC)
commit 2d2d55b772e80376489e5954af870a539300e5ee
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jun 3 22:45:51 2011 -0400
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 files changed, 1 insertions(+), 1 deletions(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]