Mercurial > dovecot > core-2.2
changeset 14356:58732d172107
dbox: Reverted recent fstat() avoidance change. It didn't do that, just broke mdbox.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 16 Mar 2012 18:45:50 +0200 |
parents | 5b05411a81cf |
children | b9adfd52cb66 |
files | src/lib-storage/index/dbox-common/dbox-file.c src/lib-storage/index/dbox-common/dbox-file.h src/lib-storage/index/dbox-multi/mdbox-file.c src/lib-storage/index/dbox-single/sdbox-file.c |
diffstat | 4 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-common/dbox-file.c Thu Mar 15 18:24:15 2012 +0200 +++ b/src/lib-storage/index/dbox-common/dbox-file.c Fri Mar 16 18:45:50 2012 +0200 @@ -588,7 +588,7 @@ return 0; } - if (ctx->output->offset == 0 && !file->created) { + if (ctx->output->offset == 0) { /* first append to existing file. seek to eof first. */ if (fstat(file->fd, &st) < 0) { dbox_file_set_syscall_error(file, "fstat()");
--- a/src/lib-storage/index/dbox-common/dbox-file.h Thu Mar 15 18:24:15 2012 +0200 +++ b/src/lib-storage/index/dbox-common/dbox-file.h Fri Mar 16 18:45:50 2012 +0200 @@ -116,7 +116,6 @@ ARRAY_DEFINE(metadata, const char *); uoff_t metadata_read_offset; - unsigned int created:1; /* this file is now being created */ unsigned int appending:1; unsigned int deleted:1; unsigned int corrupted:1;
--- a/src/lib-storage/index/dbox-multi/mdbox-file.c Thu Mar 15 18:24:15 2012 +0200 +++ b/src/lib-storage/index/dbox-multi/mdbox-file.c Fri Mar 16 18:45:50 2012 +0200 @@ -106,7 +106,6 @@ bool create_parents; int ret; - _file->created = TRUE; create_parents = dbox_file_is_in_alt(_file); _file->fd = _file->storage->v. file_create_fd(_file, _file->cur_path, create_parents);
--- a/src/lib-storage/index/dbox-single/sdbox-file.c Thu Mar 15 18:24:15 2012 +0200 +++ b/src/lib-storage/index/dbox-single/sdbox-file.c Fri Mar 16 18:45:50 2012 +0200 @@ -60,7 +60,6 @@ struct dbox_file *file; file = sdbox_file_init(mbox, 0); - file->created = TRUE; file->fd = file->storage->v. file_create_fd(file, file->primary_path, FALSE); return file;