Browse Source

don't bother renaming the message file if we are about to unlink() it

0.9
Michael Elkins 23 years ago
parent
commit
d00a65bebd
  1. 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…
Cancel
Save