diff src/plugins/mbox-snarf/mbox-snarf-plugin.c @ 8137:b2a258213ee0 HEAD

Created mail_user_[try_]home_expand(). Used them for expanding mail directories.
author Timo Sirainen <tss@iki.fi>
date Sun, 31 Aug 2008 12:23:43 +0300
parents 1f20b78f37d7
children d3cbd3494a8c
line wrap: on
line diff
--- a/src/plugins/mbox-snarf/mbox-snarf-plugin.c	Sun Aug 31 11:50:27 2008 +0300
+++ b/src/plugins/mbox-snarf/mbox-snarf-plugin.c	Sun Aug 31 12:23:43 2008 +0300
@@ -168,10 +168,11 @@
 static void mbox_snarf_mail_storage_created(struct mail_storage *storage)
 {
 	struct mbox_snarf_mail_storage *mstorage;
+	const char *path;
 
+	path = mail_user_home_expand(storage->ns->user, getenv("MBOX_SNARF"));
 	mstorage = p_new(storage->pool, struct mbox_snarf_mail_storage, 1);
-	mstorage->snarf_inbox_path =
-		p_strdup(storage->pool, home_expand(getenv("MBOX_SNARF")));
+	mstorage->snarf_inbox_path = p_strdup(storage->pool, path);
 	mstorage->module_ctx.super = storage->v;
 	storage->v.mailbox_open = mbox_snarf_mailbox_open;