[dovecot-cvs] dovecot/src/lib-storage mail-storage.c,1.64,1.65

tss at dovecot.org tss at dovecot.org
Sun Dec 3 18:53:48 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv13791

Modified Files:
	mail-storage.c 
Log Message:
Don't call mail_storage_created hook twice.



Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- mail-storage.c	25 Nov 2006 22:17:41 -0000	1.64
+++ mail-storage.c	3 Dec 2006 18:53:45 -0000	1.65
@@ -184,19 +184,18 @@
 		flags |= MAIL_STORAGE_FLAG_NO_AUTODETECTION;
 
 		name = t_strdup_until(data, p);
-		storage = mail_storage_create(name, p+1, user, flags,
-					      lock_method);
+		return mail_storage_create(name, p+1, user, flags, lock_method);
+	}
+
+	storage = mail_storage_autodetect(data, flags);
+	if (storage == NULL) {
+		i_error("Ambiguous mail location setting, "
+			"don't know what to do with it: %s "
+			"(try prefixing it with mbox: or maildir:)",
+			data);
 	} else {
-		storage = mail_storage_autodetect(data, flags);
-		if (storage == NULL) {
-			i_error("Ambiguous mail location setting, "
-				"don't know what to do with it: %s "
-				"(try prefixing it with mbox: or maildir:)",
-				data);
-		} else {
-			storage = storage->v.create(data, user, flags,
-						    lock_method);
-		}
+		storage = storage->v.create(data, user, flags,
+					    lock_method);
 	}
 
 	if (hook_mail_storage_created != NULL && storage != NULL)



More information about the dovecot-cvs mailing list