don't bother renaming the message file if we are about to unlink() it
This commit is contained in:
parent
dd22bd3f22
commit
d00a65bebd
7
sync.c
7
sync.c
|
@ -200,6 +200,11 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
|
|||
mbox->deleted++;
|
||||
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 */
|
||||
snprintf (path, sizeof (path), "%s/%s/%s",
|
||||
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, '/');
|
||||
free (cur->file);
|
||||
cur->file = strdup (p + 1);
|
||||
cur->new = 0; /* not any more */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user