[dovecot-cvs]
dovecot/src/lib-index/maildir maildir-index.c,1.30,1.31
maildir-sync.c,1.40,1.41 maildir-uidlist.c,1.5,1.6
maildir-update-flags.c,1.1,1.2
cras at procontrol.fi
cras at procontrol.fi
Sun May 18 16:56:17 EEST 2003
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-custom-flags.c,1.20,1.21
- Next message: [dovecot-cvs]
dovecot/src/lib mkdir-parents.c,NONE,1.1 mkdir-parents.h,NONE,1.1
Makefile.am,1.30,1.31 compat.h,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-index/maildir
In directory danu:/tmp/cvs-serv295/lib-index/maildir
Modified Files:
maildir-index.c maildir-sync.c maildir-uidlist.c
maildir-update-flags.c
Log Message:
Some fixes to handling read-only maildirs.
Index: maildir-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-index.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- maildir-index.c 18 May 2003 12:26:06 -0000 1.30
+++ maildir-index.c 18 May 2003 12:56:15 -0000 1.31
@@ -227,6 +227,7 @@
index->maildir_lock_fd = -1;
index->mailbox_path = i_strdup(maildir);
index->control_dir = i_strdup(control_dir);
+ index->mailbox_readonly = access(maildir, W_OK) < 0;
mail_index_init(index, index_dir);
return index;
}
Index: maildir-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-sync.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- maildir-sync.c 18 May 2003 12:26:06 -0000 1.40
+++ maildir-sync.c 18 May 2003 12:56:15 -0000 1.41
@@ -704,18 +704,16 @@
DIR *dirp;
int failed;
- if (ctx->index->maildir_have_new || ctx->index->maildir_keep_new) {
- if (ctx->new_dirp == NULL) {
- if (!maildir_new_scan_first_file(ctx))
- return FALSE;
- }
+ if (ctx->new_dirp == NULL &&
+ (ctx->index->maildir_have_new || ctx->index->maildir_keep_new)) {
+ if (!maildir_new_scan_first_file(ctx))
+ return FALSE;
+ }
- if (ctx->new_dent != NULL) {
- if (!maildir_index_full_sync_dir(ctx, ctx->new_dir,
- TRUE, ctx->new_dirp,
- ctx->new_dent))
- return FALSE;
- }
+ if (ctx->new_dent != NULL) {
+ if (!maildir_index_full_sync_dir(ctx, ctx->new_dir, TRUE,
+ ctx->new_dirp, ctx->new_dent))
+ return FALSE;
}
dirp = opendir(ctx->cur_dir);
Index: maildir-uidlist.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-uidlist.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- maildir-uidlist.c 18 May 2003 12:26:06 -0000 1.5
+++ maildir-uidlist.c 18 May 2003 12:56:15 -0000 1.6
@@ -33,6 +33,10 @@
break;
if (errno != EEXIST) {
+ if (errno == EACCES) {
+ /* read-only mailbox */
+ return 0;
+ }
index_file_set_syscall_error(index, path, "open()");
return -1;
}
Index: maildir-update-flags.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-update-flags.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- maildir-update-flags.c 18 May 2003 12:26:06 -0000 1.1
+++ maildir-update-flags.c 18 May 2003 12:56:15 -0000 1.2
@@ -17,7 +17,7 @@
return -2;
}
- if (errno == EPERM)
+ if (errno == EACCES)
index->mailbox_readonly = TRUE;
else {
index_set_error(index, "rename(%s, %s) failed: %m",
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-custom-flags.c,1.20,1.21
- Next message: [dovecot-cvs]
dovecot/src/lib mkdir-parents.c,NONE,1.1 mkdir-parents.h,NONE,1.1
Makefile.am,1.30,1.31 compat.h,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list