# std: fix File.Writer sendfile with buffered contents · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5c0ac90721ec45c6712535a99cb90df48e59e121)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5c0ac90721ec45c6712535a99cb90df48e59e121

Requested commit: 5c0ac90721ec45c6712535a99cb90df48e59e121

Commit: 5c0ac90721ec45c6712535a99cb90df48e59e121

Tree: 02a2b6fe745af5d17fdffdf65307c917a69cac71

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std: fix File.Writer sendfile with buffered contents

* File.Writer.seekBy passed wrong offset to setPosAdjustingBuffer.
* File.Writer.sendFile incorrectly used non-logical position.

Related to 1d764c1fdf04829cec5974d82cec901825a80e49

Test case provided by:

Co-authored-by: Kendall Condon <goon.pri.low@gmail.com>

```

## Parents

- [acd6ffdf69332d61b51f64f4707b472c147b7034](https://git.cafe/gitcafe/zig/commit/acd6ffdf69332d61b51f64f4707b472c147b7034?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5c0ac90721ec45c6712535a99cb90df48e59e121?format=markdown)
