changeset 8772:dfcb8a6a4f5f HEAD

maildir: We didn't properly handle missing control directory at startup. Also some other error handling when some dirs were missing were done wrong.
author Timo Sirainen <tss@iki.fi>
date Mon, 23 Feb 2009 13:40:01 -0500
parents 8b6dd6d0f33a
children 25dd184fc947
files src/lib-storage/index/maildir/maildir-keywords.c src/lib-storage/index/maildir/maildir-sync.c src/lib-storage/index/maildir/maildir-uidlist.c
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-keywords.c	Mon Feb 23 13:18:33 2009 -0500
+++ b/src/lib-storage/index/maildir/maildir-keywords.c	Mon Feb 23 13:40:01 2009 -0500
@@ -371,7 +371,7 @@
 		}
 		/* the control dir doesn't exist. create it unless the whole
 		   mailbox was just deleted. */
-		if (maildir_set_deleted(mk->mbox))
+		if (!maildir_set_deleted(mk->mbox))
 			return -1;
 	}
 
--- a/src/lib-storage/index/maildir/maildir-sync.c	Mon Feb 23 13:18:33 2009 -0500
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Mon Feb 23 13:40:01 2009 -0500
@@ -344,7 +344,7 @@
 		if (errno != ENOENT || i == MAILDIR_DELETE_RETRY_COUNT)
 			break;
 
-		if (maildir_set_deleted(mbox))
+		if (!maildir_set_deleted(mbox))
 			return -1;
 		/* try again */
 	}
@@ -380,7 +380,7 @@
 			return -1;
 		}
 
-		if (maildir_set_deleted(ctx->mbox))
+		if (!maildir_set_deleted(ctx->mbox))
 			return -1;
 		/* try again */
 	}
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Mon Feb 23 13:18:33 2009 -0500
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Mon Feb 23 13:40:01 2009 -0500
@@ -164,7 +164,7 @@
 		}
 		/* the control dir doesn't exist. create it unless the whole
 		   mailbox was just deleted. */
-		if (maildir_set_deleted(uidlist->mbox))
+		if (!maildir_set_deleted(uidlist->mbox))
 			return -1;
 	}
 
@@ -1119,7 +1119,7 @@
 		}
 		/* the control dir doesn't exist. create it unless the whole
 		   mailbox was just deleted. */
-		if (maildir_set_deleted(uidlist->mbox))
+		if (!maildir_set_deleted(uidlist->mbox))
 			return -1;
 	}