summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-11-13 18:31:06 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-11-13 18:31:06 +0000
commit5b4d5ad070734b938087490a0e0ff1db358777ab (patch)
tree806b0706cbde198c2c8685d33c1f2291864acfd1
parentbc92785af6490c276dcdfedc72eba23a95dbbe4e (diff)
Currently, Mutt won't use a default folder if just the IMAP server is
specified. In fact, if the folder isn't specified, it will core-dump. The attached patch will use INBOX as the IMAP folder name if none is specified, eliminating the core-dump. (From: Aaron Schrab <aaron+mutt@schrab.com>)
-rw-r--r--imap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap.c b/imap.c
index f1a17e54..10573160 100644
--- a/imap.c
+++ b/imap.c
@@ -969,7 +969,7 @@ int imap_open_mailbox (CONTEXT *ctx)
ctx->data = safe_malloc (sizeof (IMAP_DATA));
memset (ctx->data, 0, sizeof (IMAP_DATA));
- CTX_DATA->mailbox = safe_strdup (pc);
+ CTX_DATA->mailbox = safe_strdup (*pc?pc:"INBOX");
conn = mutt_socket_select_connection (host, IMAP_PORT, M_NEW_SOCKET);
CTX_DATA->conn = conn;