[dovecot-cvs]
dovecot/src/lib-index/maildir maildir-index.c,1.28,1.29
maildir-index.h,1.19,1.20 maildir-uidlist.c,1.3,1.4
cras at procontrol.fi
cras at procontrol.fi
Sat May 17 17:09:57 EEST 2003
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-custom-flags.c,1.19,1.20
mail-index.c,1.88,1.89 mail-index.h,1.74,1.75
- Next message: [dovecot-cvs] dovecot/src/lib-index/mbox mbox-index.c,1.72,1.73
mbox-index.h,1.28,1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib-index/maildir
In directory danu:/tmp/cvs-serv6930/lib-index/maildir
Modified Files:
maildir-index.c maildir-index.h maildir-uidlist.c
Log Message:
Maildir: CONTROL=<dir> in MAIL environment now specifies where to save
.customflags and dovecot-uidlist files. This can be useful if the main
mail directory is under hard quota.
Index: maildir-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-index.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- maildir-index.c 9 Apr 2003 20:10:01 -0000 1.28
+++ maildir-index.c 17 May 2003 13:09:55 -0000 1.29
@@ -205,7 +205,9 @@
return str_c(flags_str);
}
-struct mail_index *maildir_index_alloc(const char *dir, const char *maildir)
+struct mail_index *
+maildir_index_alloc(const char *maildir, const char *index_dir,
+ const char *control_dir)
{
struct mail_index *index;
@@ -216,7 +218,8 @@
index->maildir_lock_fd = -1;
index->mailbox_path = i_strdup(maildir);
- mail_index_init(index, dir);
+ index->control_dir = i_strdup(control_dir);
+ mail_index_init(index, index_dir);
return index;
}
Index: maildir-index.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-index.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- maildir-index.h 8 May 2003 18:59:38 -0000 1.19
+++ maildir-index.h 17 May 2003 13:09:55 -0000 1.20
@@ -8,7 +8,9 @@
/* ":2,DFRST" - leave the 2 extra for other clients' additions */
#define MAILDIR_LOCATION_EXTRA_SPACE 10
-struct mail_index *maildir_index_alloc(const char *dir, const char *maildir);
+struct mail_index *
+maildir_index_alloc(const char *maildir, const char *index_dir,
+ const char *control_dir);
/* Return new filename base to save into tmp/ */
const char *maildir_generate_tmp_filename(const struct timeval *tv);
Index: maildir-uidlist.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-uidlist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- maildir-uidlist.c 27 Apr 2003 00:58:12 -0000 1.3
+++ maildir-uidlist.c 17 May 2003 13:09:55 -0000 1.4
@@ -25,7 +25,7 @@
i_assert(!INDEX_IS_UIDLIST_LOCKED(index));
- path = t_strconcat(index->mailbox_path,
+ path = t_strconcat(index->control_dir,
"/" MAILDIR_UIDLIST_NAME ".lock", NULL);
for (i = 0; i < 2; i++) {
fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0644);
@@ -70,7 +70,7 @@
if (!INDEX_IS_UIDLIST_LOCKED(index))
return;
- path = t_strconcat(index->mailbox_path,
+ path = t_strconcat(index->control_dir,
"/" MAILDIR_UIDLIST_NAME ".lock", NULL);
if (unlink(path) < 0 && errno != ENOENT)
index_file_set_syscall_error(index, path, "unlink()");
@@ -87,7 +87,7 @@
unsigned int version;
int fd;
- path = t_strconcat(index->mailbox_path, "/" MAILDIR_UIDLIST_NAME, NULL);
+ path = t_strconcat(index->control_dir, "/" MAILDIR_UIDLIST_NAME, NULL);
fd = open(path, O_RDONLY);
if (fd == -1) {
if (errno != ENOENT)
@@ -243,7 +243,7 @@
return FALSE;
}
- temp_path = t_strconcat(index->mailbox_path,
+ temp_path = t_strconcat(index->control_dir,
"/" MAILDIR_UIDLIST_NAME ".lock", NULL);
failed = !maildir_uidlist_rewrite_fd(index, temp_path, mtime);
@@ -254,7 +254,7 @@
index->maildir_lock_fd = -1;
if (!failed) {
- db_path = t_strconcat(index->mailbox_path,
+ db_path = t_strconcat(index->control_dir,
"/" MAILDIR_UIDLIST_NAME, NULL);
if (rename(temp_path, db_path) < 0) {
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-custom-flags.c,1.19,1.20
mail-index.c,1.88,1.89 mail-index.h,1.74,1.75
- Next message: [dovecot-cvs] dovecot/src/lib-index/mbox mbox-index.c,1.72,1.73
mbox-index.h,1.28,1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list