comparison src/master/mail-process.c @ 9555:0cf38dcd8ced HEAD

Don't double-expand mail_location %variables when namespace location is empty.
author Timo Sirainen <tss@iki.fi>
date Sat, 27 Mar 2010 03:54:00 +0200
parents 00cd9aacd03c
children
comparison
equal deleted inserted replaced
9554:59591ed04610 9555:0cf38dcd8ced
275 275
276 if (default_location == NULL) 276 if (default_location == NULL)
277 default_location = ""; 277 default_location = "";
278 278
279 for (i = 1; ns != NULL; i++, ns = ns->next) { 279 for (i = 1; ns != NULL; i++, ns = ns->next) {
280 location = *ns->location != '\0' ? ns->location : 280 if (*ns->location == '\0')
281 default_location; 281 location = default_location;
282 location = expand_mail_env(location, table); 282 else
283 location = expand_mail_env(ns->location, table);
283 env_put(t_strdup_printf("NAMESPACE_%u=%s", i, location)); 284 env_put(t_strdup_printf("NAMESPACE_%u=%s", i, location));
284 285
285 if (ns->separator != NULL) { 286 if (ns->separator != NULL) {
286 env_put(t_strdup_printf("NAMESPACE_%u_SEP=%s", 287 env_put(t_strdup_printf("NAMESPACE_%u_SEP=%s",
287 i, ns->separator)); 288 i, ns->separator));