From: Timo Sirainen Date: Thu, 12 May 2016 11:23:51 +0000 (-0400) Subject: lib-fs: Set fs error on fs_write_stream_abort() X-Git-Tag: 2.3.0.rc1~3778 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaac2584903d75da935eeee5098a7baa904f1afd;p=thirdparty%2Fdovecot%2Fcore.git lib-fs: Set fs error on fs_write_stream_abort() Probably would be nice for fs_write_stream_abort() to have an error string parameter, which could be used instead of this generic error. --- diff --git a/src/lib-fs/fs-api.c b/src/lib-fs/fs-api.c index ed7e179c02..7bbd8888b0 100644 --- a/src/lib-fs/fs-api.c +++ b/src/lib-fs/fs-api.c @@ -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); }