]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: Reverted recent fstat() avoidance change. It didn't do that, just broke mdbox.
authorTimo Sirainen <tss@iki.fi>
Fri, 16 Mar 2012 16:45:50 +0000 (18:45 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 16 Mar 2012 16:45:50 +0000 (18:45 +0200)
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

index 03e49c304b80e5be7ae66a24a6295c286433bd2f..8b06d711ee925357a53cd07a578bfc566d3be362 100644 (file)
@@ -588,7 +588,7 @@ int dbox_file_get_append_stream(struct dbox_file_append_context *ctx,
                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()");
index fc4fe5565bb22ee2578e4dd054f7a3aaba0adfd7..bb7b81d0af105362fce2b6f2a2b5dce826491734 100644 (file)
@@ -116,7 +116,6 @@ struct dbox_file {
        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;
index 4c4197a6abb3ca079dd6547a034e83931d46e97d..147ceeb04907a5195e8902a111cb29ab3aa28fc3 100644 (file)
@@ -106,7 +106,6 @@ static int mdbox_file_create(struct mdbox_file *file)
        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);
index 562ccb025d19df9caa3fe558ea6161e759222ceb..af2ebd03778e36a5d64a671656c38e6ccebd4a70 100644 (file)
@@ -60,7 +60,6 @@ struct dbox_file *sdbox_file_create(struct sdbox_mailbox *mbox)
        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;