]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: Set fs error on fs_write_stream_abort()
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 12 May 2016 11:23:51 +0000 (07:23 -0400)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 12 May 2016 11:39:00 +0000 (07:39 -0400)
Probably would be nice for fs_write_stream_abort() to have an error string
parameter, which could be used instead of this generic error.

src/lib-fs/fs-api.c

index ed7e179c02d02c6b7d80f0350cb0c28bfffce0c9..7bbd8888b0d22928c9db1acc918c6d349f2d7cf7 100644 (file)
@@ -703,6 +703,8 @@ void fs_write_stream_abort(struct fs_file *file, struct ostream **output)
        *output = NULL;
        if (file->output != NULL)
                o_stream_ignore_last_errors(file->output);
+       /* make sure we don't have an old error lying around */
+       fs_set_error(file->fs, "Write aborted");
        (void)fs_write_stream_finish_int(file, FALSE);
 }