shithub: riscv

Download patch

ref: 7367b8d2e75301fb33830404b66ded43bbd56356
parent: e3a43c4f2b3751da67d24e40a77d8bcac3957520
author: Ori Bernstein <[email protected]>
date: Thu Oct 10 07:52:22 EDT 2019

Fetch IMAP flags from server. This makes us sync read/answered/... flags with unix.

--- a/sys/src/cmd/upas/fs/imap.c
+++ b/sys/src/cmd/upas/fs/imap.c
@@ -221,7 +221,7 @@
 	char	*flag;
 	int	e;
 } ftab[] = {
-	"Answered",	Fanswered,
+	"\\Answered",	Fanswered,
 	"\\Deleted",	Fdeleted,
 	"\\Draft",		Fdraft,
 	"\\Flagged",	Fflagged,
@@ -850,8 +850,8 @@
 	imap = mb->aux;
 	if(imap->flags & Fgmail)
 		l = gmaildiscount(m, o, l);
-	idprint(imap, "uid fetch %lud (body.peek[]<%llud.%lud>)\n", (ulong)m->imapuid, o, l);
-	imap4cmd(imap, "uid fetch %lud (body.peek[]<%llud.%lud>)", (ulong)m->imapuid, 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");
 		return -1;