From: Timo Sirainen Date: Fri, 28 Mar 2014 13:31:06 +0000 (+0200) Subject: lib-fs: posix backend now names the istreams with the file's path. X-Git-Tag: 2.2.13.rc1~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf2760c13f6e0acae88d48ef9ec618e0f13a0515;p=thirdparty%2Fdovecot%2Fcore.git lib-fs: posix backend now names the istreams with the file's path. --- diff --git a/src/lib-fs/fs-posix.c b/src/lib-fs/fs-posix.c index f80a969d70..62eed4956f 100644 --- a/src/lib-fs/fs-posix.c +++ b/src/lib-fs/fs-posix.c @@ -348,12 +348,11 @@ fs_posix_read_stream(struct fs_file *_file, size_t max_buffer_size) struct posix_fs_file *file = (struct posix_fs_file *)_file; struct istream *input; - if (file->fd == -1 && fs_posix_open(file) < 0) { + if (file->fd == -1 && fs_posix_open(file) < 0) input = i_stream_create_error(errno); - i_stream_set_name(input, _file->path); - } else { + else input = i_stream_create_fd(file->fd, max_buffer_size, FALSE); - } + i_stream_set_name(input, _file->path); i_stream_add_destroy_callback(input, fs_posix_file_close, _file); return input; }