dovecot-2.2: mkdir_parents(): Handle mkdir() EEXIST errors that ...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 5 15:38:09 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/16212e6d4fd4
changeset: 17324:16212e6d4fd4
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 05 18:37:16 2014 +0300
description:
mkdir_parents(): Handle mkdir() EEXIST errors that may happen during race conditions.
We don't care about EEXIST errors that happen when trying to mkdir() parent
directories, only if it happens when mkdir()ing the last directory.

diffstat:

 src/lib/mkdir-parents.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 3a5304b63f88 -r 16212e6d4fd4 src/lib/mkdir-parents.c
--- a/src/lib/mkdir-parents.c	Mon May 05 16:24:53 2014 +0300
+++ b/src/lib/mkdir-parents.c	Mon May 05 18:37:16 2014 +0300
@@ -112,7 +112,7 @@
 						       mode, uid,
 						       gid, gid_origin);
 		} T_END;
-		if (ret < 0)
+		if (ret < 0 && errno != EEXIST)
 			return -1;
 
 		/* should work now */


More information about the dovecot-cvs mailing list