]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: posix backend now names the istreams with the file's path.
authorTimo Sirainen <tss@iki.fi>
Fri, 28 Mar 2014 13:31:06 +0000 (15:31 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 28 Mar 2014 13:31:06 +0000 (15:31 +0200)
src/lib-fs/fs-posix.c

index f80a969d703e242656ad76677ab2c0da1699c327..62eed4956fec5e6608bfb1227c251604e4627859 100644 (file)
@@ -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;
 }