···45454646/* imap_expand_path: IMAP implementation of mutt_expand_path. Rewrite
4747 * an IMAP path in canonical and absolute form.
4848- * Inputs: a buffer containing an IMAP path, and the number of bytes in
4949- * that buffer.
4848+ * Inputs: a buffer containing an IMAP path.
5049 * Outputs: The buffer is rewritten in place with the canonical IMAP path.
5151- * Returns 0 on success, or -1 if imap_parse_path chokes or url_ciss_tostring
5050+ * Returns 0 on success, or -1 if imap_parse_path chokes or url_ciss_tobuffer
5251 * fails, which it might if there isn't enough room in the buffer. */
5353-int imap_expand_path (char* path, size_t len)
5252+int imap_expand_path (BUFFER* path)
5453{
5554 IMAP_MBOX mx;
5655 IMAP_DATA* idata;
···5857 char fixedpath[LONG_STRING];
5958 int rc;
60596161- if (imap_parse_path (path, &mx) < 0)
6060+ if (imap_parse_path (mutt_b2s (path), &mx) < 0)
6261 return -1;
63626463 idata = imap_conn_find (&mx.account, MUTT_IMAP_CONN_NONEW);
···6665 imap_fix_path (idata, mx.mbox, fixedpath, sizeof (fixedpath));
6766 url.path = fixedpath;
68676969- rc = url_ciss_tostring (&url, path, len, U_DECODE_PASSWD);
6868+ rc = url_ciss_tobuffer (&url, path, U_DECODE_PASSWD);
7069 FREE (&mx.mbox);
71707271 return rc;