+2008-10-19 12:41 -0700 Brendan Cully <brendan@kublai.com> (1dd2d83b5c34)
+
+ * mutt_socket.c: Fix buglet in logging from previous commit
+
+ * mutt_socket.c: Handle short writes in mutt_socket_write_d. See
+ #3000. Apparently even blocking I/O with signals masked can
+ sometimes return early. Based on a patch by Patrick Welche.
+
2008-10-19 15:14 +0200 Emanuele Giaquinta <e.giaquinta@glauco.it> (2f04a811db3f)
* pattern.c, sendlib.c: Remove unused functions.
{
IMAP_MBOX mx;
ciss_url_t url;
+ char fixedpath[LONG_STRING];
int rc;
if (imap_parse_path (path, &mx) < 0)
return -1;
mutt_account_tourl (&mx.account, &url);
- url.path = mx.mbox;
+ imap_fix_path(NULL, mx.mbox, fixedpath, sizeof (fixedpath));
+ url.path = fixedpath;
rc = url_ciss_tostring (&url, path, len, U_DECODE_PASSWD);
FREE (&mx.mbox);
char *imap_fix_path (IMAP_DATA *idata, char *mailbox, char *path,
size_t plen)
{
- int x = 0;
+ int i = 0;
+ char delim;
+
+ if (idata)
+ delim = idata->delim;
+ else if (ImapDelimChars && ImapDelimChars[0])
+ delim = ImapDelimChars[0];
+ else
+ delim = '/';
- while (mailbox && *mailbox && (x < (plen - 1)))
+ while (mailbox && *mailbox && i < plen - 1)
{
- if ((*mailbox == '/') || (*mailbox == idata->delim))
+ if (strchr(ImapDelimChars, *mailbox) || *mailbox == delim)
{
- while ((*mailbox == '/') || (*mailbox == idata->delim)) mailbox++;
- path[x] = idata->delim;
+ while (strchr(ImapDelimChars, *mailbox) || *mailbox == delim)
+ mailbox++;
+ path[i] = delim;
}
else
{
- path[x] = *mailbox;
+ path[i] = *mailbox;
mailbox++;
}
- x++;
+ i++;
}
- if (x && path[--x] != idata->delim)
- x++;
- path[x] = '\0';
+ if (i && path[--i] != delim)
+ i++;
+ path[i] = '\0';
if (!path[0])
strfcpy (path, "INBOX", plen);