[dovecot-cvs] dovecot/src/lib-storage/index/cydir cydir-storage.c, 1.10, 1.11

tss at dovecot.org tss at dovecot.org
Tue Apr 3 10:31:50 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/cydir
In directory talvi:/tmp/cvs-serv12297/cydir

Modified Files:
	cydir-storage.c 
Log Message:
Minor optimization. If we just checked that the directory existed, don't
mkdir() it.



Index: cydir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/cydir/cydir-storage.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cydir-storage.c	30 Mar 2007 18:57:35 -0000	1.10
+++ cydir-storage.c	3 Apr 2007 07:31:48 -0000	1.11
@@ -115,12 +115,13 @@
 			}
 			return -1;
 		}
-	}
-
-	if (mkdir_parents(list_set.root_dir, CREATE_MODE) < 0 &&
-	    errno != EEXIST) {
-		i_error("mkdir_parents(%s) failed: %m", list_set.root_dir);
-		return -1;
+	} else {
+		if (mkdir_parents(list_set.root_dir, CREATE_MODE) < 0 &&
+		    errno != EEXIST) {
+			i_error("mkdir_parents(%s) failed: %m",
+				list_set.root_dir);
+			return -1;
+		}
 	}
 
 	if (mailbox_list_init("fs", &list_set,



More information about the dovecot-cvs mailing list