|
|
@ -200,6 +200,11 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags, |
|
|
|
mbox->deleted++; |
|
|
|
mbox->deleted++; |
|
|
|
cur->flags |= (tmp->flags & ~(D_RECENT | D_DRAFT)); |
|
|
|
cur->flags |= (tmp->flags & ~(D_RECENT | D_DRAFT)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* don't bother renaming the file if we are just going to
|
|
|
|
|
|
|
|
* remove it later. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
if ((cur->flags & D_DELETED) == 0 || (flags & SYNC_EXPUNGE) == 0) |
|
|
|
|
|
|
|
{ |
|
|
|
/* generate old path */ |
|
|
|
/* generate old path */ |
|
|
|
snprintf (path, sizeof (path), "%s/%s/%s", |
|
|
|
snprintf (path, sizeof (path), "%s/%s/%s", |
|
|
|
mbox->path, cur->new ? "new" : "cur", cur->file); |
|
|
|
mbox->path, cur->new ? "new" : "cur", cur->file); |
|
|
@ -230,6 +235,8 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags, |
|
|
|
p = strrchr (newpath, '/'); |
|
|
|
p = strrchr (newpath, '/'); |
|
|
|
free (cur->file); |
|
|
|
free (cur->file); |
|
|
|
cur->file = strdup (p + 1); |
|
|
|
cur->file = strdup (p + 1); |
|
|
|
|
|
|
|
cur->new = 0; /* not any more */ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|