dovecot-2.1: lib-storage: mail_user_try_home_expand() now looks ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Apr 10 10:09:46 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/20e1aa322b1e
changeset: 14407:20e1aa322b1e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Apr 10 10:09:39 2012 +0300
description:
lib-storage: mail_user_try_home_expand() now looks up home only when needed.
Before a recent code cleanup the lookup was always done, but if the home
didn't exist it still just happened to return success. The cleanup changed
it to return failure, which broke the original behavior.

diffstat:

 src/lib-storage/mail-user.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 0b59dbb1a288 -r 20e1aa322b1e src/lib-storage/mail-user.c
--- a/src/lib-storage/mail-user.c	Tue Apr 10 09:52:35 2012 +0300
+++ b/src/lib-storage/mail-user.c	Tue Apr 10 10:09:39 2012 +0300
@@ -343,6 +343,11 @@
 {
 	const char *home, *path = *pathp;
 
+	if (strncmp(path, "~/", 2) != 0) {
+		/* no need to expand home */
+		return 0;
+	}
+
 	if (mail_user_get_home(user, &home) <= 0)
 		return -1;
 


More information about the dovecot-cvs mailing list