[dovecot-cvs] dovecot/src/master mail-process.c,1.35,1.36
cras at procontrol.fi
cras at procontrol.fi
Mon Sep 15 17:59:11 EEST 2003
Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv31986
Modified Files:
mail-process.c
Log Message:
Support %vars in namespace prefix.
Index: mail-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mail-process.c 6 Sep 2003 17:44:51 -0000 1.35
+++ mail-process.c 15 Sep 2003 13:59:08 -0000 1.36
@@ -109,6 +109,7 @@
{
const char *location;
unsigned int i;
+ string_t *str;
if (default_location == NULL)
default_location = "";
@@ -130,8 +131,11 @@
i, ns->type));
}
if (ns->prefix != NULL) {
- env_put(t_strdup_printf("NAMESPACE_%u_PREFIX=%s",
- i, ns->prefix));
+ /* expand variables, eg. ~%u/ can be useful */
+ str = t_str_new(256);
+ str_printfa(str, "NAMESPACE_%u_PREFIX=", i);
+ var_expand(str, ns->prefix, user, home);
+ env_put(str_c(str));
}
if (ns->inbox)
env_put(t_strdup_printf("NAMESPACE_%u_INBOX=1", i));
More information about the dovecot-cvs
mailing list