summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/upas/fs/imap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/cmd/upas/fs/imap.c b/sys/src/cmd/upas/fs/imap.c
index 7bcc84477..187b1ace9 100644
--- a/sys/src/cmd/upas/fs/imap.c
+++ b/sys/src/cmd/upas/fs/imap.c
@@ -865,14 +865,16 @@ static int
imap4fetch(Mailbox *mb, Message *m, uvlong o, ulong l)
{
Imap *imap;
+ char *resp;
imap = mb->aux;
if(imap->flags & Fgmail)
l = gmaildiscount(m, o, l);
idprint(imap, "uid fetch %lud (flags body.peek[]<%llud.%lud>)\n", (ulong)m->imapuid, o, l);
imap4cmd(imap, "uid fetch %lud (flags body.peek[]<%llud.%lud>)", (ulong)m->imapuid, o, l);
- if(!isokay(imap4resp0(imap, mb, m))){
- eprint("imap: imap fetch failed\n");
+ resp = imap4resp0(imap, mb, m);
+ if(!isokay(resp)){
+ eprint("imap: imap fetch failed: %s\n", resp);
return -1;
}
return 0;