From: Timo Sirainen Date: Fri, 8 Nov 2013 15:48:54 +0000 (+0200) Subject: mail_attachment_*: Fixed "stream doesn't support seeking backwards" panic X-Git-Tag: 2.2.8~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fffb5431af081379c169d0d96aafe2a9a7352be2;p=thirdparty%2Fdovecot%2Fcore.git mail_attachment_*: Fixed "stream doesn't support seeking backwards" panic Caused by recent changes. --- diff --git a/src/lib-storage/index/index-attachment.c b/src/lib-storage/index/index-attachment.c index 98475fc36e..4af36311b8 100644 --- a/src/lib-storage/index/index-attachment.c +++ b/src/lib-storage/index/index-attachment.c @@ -423,7 +423,8 @@ int index_attachment_stream_get(struct fs *fs, const char *attachment_dir, array_foreach(&extrefs_arr, extref) { path = t_strdup_printf("%s/%s%s", attachment_dir, extref->path, path_suffix); - file = fs_file_init(fs, path, FS_OPEN_MODE_READONLY); + file = fs_file_init(fs, path, FS_OPEN_MODE_READONLY | + FS_OPEN_FLAG_SEEKABLE); input = i_stream_create_fs_file(&file, IO_BLOCK_SIZE); ret = istream_attachment_connector_add(conn, input,