[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.151, 1.152
tss at dovecot.org
tss at dovecot.org
Thu Mar 15 03:30:06 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv30095
Modified Files:
maildir-storage.c
Log Message:
If mailbox is deleted under us while we're also deleting it, handle it
without logging an error message.
Index: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -d -r1.151 -r1.152
--- maildir-storage.c 6 Mar 2007 15:39:04 -0000 1.151
+++ maildir-storage.c 15 Mar 2007 01:30:03 -0000 1.152
@@ -676,6 +676,14 @@
mailbox listing sees it. */
count = 0;
while (rename(src, dest) < 0 && count < 2) {
+ if (errno == ENOENT) {
+ /* it was just deleted under us by
+ another process */
+ mail_storage_set_error(_storage,
+ MAIL_STORAGE_ERR_MAILBOX_NOT_FOUND,
+ name);
+ return -1;
+ }
if (!EDESTDIREXISTS(errno)) {
mail_storage_set_critical(_storage,
"rename(%s, %s) failed: %m", src, dest);
More information about the dovecot-cvs
mailing list