From bf2760c13f6e0acae88d48ef9ec618e0f13a0515 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 28 Mar 2014 15:31:06 +0200 Subject: [PATCH] lib-fs: posix backend now names the istreams with the file's path. --- src/lib-fs/fs-posix.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; } -- 2.47.3