summaryrefslogtreecommitdiff
path: root/sys/src/cmd/upas/fs
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2020-02-05 14:11:15 -0800
committerOri Bernstein <ori@eigenstate.org>2020-02-05 14:11:15 -0800
commit8b59286ef1d9bef6c2c7b248ab0b8072e25ec9cf (patch)
treeea34abfd90316d10da612da160014035d0268370 /sys/src/cmd/upas/fs
parent70043845680fe6737b21215021e011880969fb78 (diff)
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)
Diffstat (limited to 'sys/src/cmd/upas/fs')
-rw-r--r--sys/src/cmd/upas/fs/fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/cmd/upas/fs/fs.c b/sys/src/cmd/upas/fs/fs.c
index fbb515928..df3ea3829 100644
--- a/sys/src/cmd/upas/fs/fs.c
+++ b/sys/src/cmd/upas/fs/fs.c
@@ -1193,10 +1193,11 @@ modflags(Mailbox *mb, Message *m, char *p)
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;
}