dovecot-2.0: acl: Avoid extra open() on a directory for default ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 1 16:56:13 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/e12b7ee0a9dc
changeset: 12216:e12b7ee0a9dc
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 01 14:56:07 2010 +0100
description:
acl: Avoid extra open() on a directory for default acl.

diffstat:

 src/plugins/acl/acl-backend-vfile.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r ecc0bc80288c -r e12b7ee0a9dc src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Thu Sep 30 20:28:54 2010 +0100
+++ b/src/plugins/acl/acl-backend-vfile.c	Fri Oct 01 14:56:07 2010 +0100
@@ -173,8 +173,11 @@
 
 		vname = t_str_new(128);
 		mail_namespace_get_vname(ns, vname, name);
-		aclobj->global_path = i_strconcat(backend->global_dir, "/",
-						  str_c(vname), NULL);
+		if (str_len(vname) > 0) {
+			aclobj->global_path =
+				i_strconcat(backend->global_dir, "/",
+					    str_c(vname), NULL);
+		}
 	} T_END;
 
 	dir = acl_backend_vfile_get_local_dir(_backend, name);


More information about the dovecot-cvs mailing list