Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-storage/index/shared/shared-storage.c @ 8544:983d38de06c9 HEAD
var_expand(): Added support for long %{variable} names.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 13 Dec 2008 18:04:55 +0200 |
parents | 03c418eadc8b |
children | b9faf4db2a9f |
line wrap: on
line diff
--- a/src/lib-storage/index/shared/shared-storage.c Sat Dec 13 17:12:46 2008 +0200 +++ b/src/lib-storage/index/shared/shared-storage.c Sat Dec 13 18:04:55 2008 +0200 @@ -126,11 +126,11 @@ struct shared_storage *storage = (struct shared_storage *)_storage; struct mail_user *user = _storage->ns->user; static struct var_expand_table static_tab[] = { - { 'u', NULL }, - { 'n', NULL }, - { 'd', NULL }, - { 'h', NULL }, - { '\0', NULL } + { 'u', NULL, "user" }, + { 'n', NULL, "username" }, + { 'd', NULL, "domain" }, + { 'h', NULL, "home" }, + { '\0', NULL, NULL } }; struct var_expand_table *tab; struct mail_namespace *ns; @@ -208,7 +208,7 @@ } owner = mail_user_init(userdomain); - if (!var_has_key(storage->location, 'h')) + if (!var_has_key(storage->location, 'h', "home")) ret = 1; else { /* we'll need to look up the user's home directory */