ref: d9dcce4a036cda06901e7768aad99d430ded3b7d
parent: e01d88046c40bb23331fb5bd45b9f27d61eb3fe5
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Feb 5 09:11:15 EST 2020
upas/fs plumb modify messages for self-changed flags Currently upas/fs plumbs modify messages only if the flag changes are made by another imap connection. If the flag changes are made within the running upas/fs no modify message is plumbed. This changes upas/fs to set the modify flag if we made the change ourself. It also moves the flag setting before the imap read, so that we don't clobber flag changes coming from the imap server with our own flags. (Thanks Tobias Heinicke)
--- a/sys/src/cmd/upas/fs/fs.c
+++ b/sys/src/cmd/upas/fs/fs.c
@@ -1193,10 +1193,11 @@
if(err = txflags(p, &f))
return err;
if(f != m->flags){- if(mb->modflags != nil)
- mb->modflags(mb, m, f);
m->flags = f;
m->cstate |= Cidxstale;
+ m->cstate |= Cmod;
+ if(mb->modflags != nil)
+ mb->modflags(mb, m, f);
}
return nil;
}
--
⑨