/* util.c */
int imap_expand_path (char* path, size_t len);
int imap_parse_path (const char* path, IMAP_MBOX* mx);
-void imap_pretty_mailbox (char* path);
+void imap_pretty_mailbox (char* path, size_t pathlen);
int imap_wait_keepalive (pid_t pid);
void imap_keepalive (void);
/* imap_pretty_mailbox: called by mutt_pretty_mailbox to make IMAP paths
* look nice. */
-void imap_pretty_mailbox (char* path)
+void imap_pretty_mailbox (char* path, size_t pathlen)
{
IMAP_MBOX home, target;
ciss_url_t url;
{
mutt_account_tourl (&target.account, &url);
url.path = target.mbox;
- /* FIXME: That hard-coded constant is bogus. But we need the actual
- * size of the buffer from mutt_pretty_mailbox. And these pretty
- * operations usually shrink the result. Still... */
- url_ciss_tostring (&url, path, 1024, 0);
+ url_ciss_tostring (&url, path, pathlen, 0);
}
FREE (&target.mbox);
#ifdef USE_IMAP
if (scheme == U_IMAP || scheme == U_IMAPS)
{
- imap_pretty_mailbox (s);
+ imap_pretty_mailbox (s, buflen);
return;
}
#endif