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

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

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

Visibility: public

Requested revision: 4c27eeff8e25d59648680696a35235af2e067933

Requested commit: 4c27eeff8e25d59648680696a35235af2e067933

Commit: 4c27eeff8e25d59648680696a35235af2e067933

Tree: 9d28e0d6d5273f0169d2b0a4109d790c3798346f

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

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

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