From 64df2f7a535e163632309fe0c5d73c0c71d6b419 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 14 Nov 2018 00:31:41 +0100 Subject: [PATCH] imap: remove ImapMbox from imap_adata_find() --- imap/util.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/imap/util.c b/imap/util.c index 8ce46c692..c52f4f12e 100644 --- a/imap/util.c +++ b/imap/util.c @@ -129,10 +129,10 @@ struct ImapAccountData *imap_adata_get(struct Mailbox *m) struct ImapAccountData *imap_adata_find(const char *path, char *mailbox, size_t mailboxlen, bool fix_path) { - // NOTE(sileht): Remove mx when we are able to pass Mailbox or Url there. - struct ImapMbox mx; + struct ConnAccount conn_account; + char tmp[LONG_STRING]; - if (imap_parse_path(path, &mx) < 0) + if (imap_parse_path2(path, &conn_account, tmp, sizeof(tmp)) < 0) return NULL; struct Account *np = NULL; @@ -143,14 +143,14 @@ struct ImapAccountData *imap_adata_find(const char *path, char *mailbox, continue; adata = np->adata; - if (imap_account_match(&adata->conn_account, &mx.account)) + if (imap_account_match(&adata->conn_account, &conn_account)) { - if (mx.mbox) + if (tmp[0] != '\0') { if (fix_path) - imap_fix_path(adata, mx.mbox, mailbox, mailboxlen); + imap_fix_path(adata, tmp, mailbox, mailboxlen); else - mutt_str_strfcpy(mailbox, mx.mbox, mailboxlen); + mutt_str_strfcpy(mailbox, tmp, mailboxlen); } return adata; } -- 2.40.0