From: Timo Sirainen Date: Sun, 22 Sep 2013 01:40:02 +0000 (+0300) Subject: lib-storage: Improve error message logging when attachment writing fails X-Git-Tag: 2.2.6~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ba3ecf529e681688bbf728fc3cb5101bd68d671;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Improve error message logging when attachment writing fails --- diff --git a/src/lib-storage/index/index-attachment.c b/src/lib-storage/index/index-attachment.c index d793f92aae..29ca262d6d 100644 --- a/src/lib-storage/index/index-attachment.c +++ b/src/lib-storage/index/index-attachment.c @@ -131,7 +131,9 @@ index_attachment_close_ostream(struct ostream *output, bool success, if (ret < 0) fs_write_stream_abort(attach->cur_file, &output); else if (fs_write_stream_finish(attach->cur_file, &output) < 0) { - *error_r = t_strdup(fs_file_last_error(attach->cur_file)); + *error_r = t_strdup_printf("Couldn't create attachment %s: %s", + fs_file_path(attach->cur_file), + fs_file_last_error(attach->cur_file)); ret = -1; } fs_file_deinit(&attach->cur_file);