# std.Build.Cache: change contract of \`addFilePostContents\` · gitcafe/zig

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

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

Visibility: public

Requested revision: d32829e053af2a0f382d4d692ede85c176c9f803

Requested commit: d32829e053af2a0f382d4d692ede85c176c9f803

Commit: d32829e053af2a0f382d4d692ede85c176c9f803

Tree: 1b85e5aa9e44648f78a0aa56110cff226136f5a8

Author: mlugg

Committer: mlugg

## Message

```
std.Build.Cache: change contract of `addFilePostContents`

This function was broken, because it took ownership of the buffer on
error *sometimes*, in a way which the caller could not tell. Rather than
trying to be clever, it's easier to just follow the same interface as
all other `addFilePost` methods, and not take ownership of the path.

This is a breaking change. The next commits will apply it to the
compiler, which is the only user of this function in the ziglang/zig
repository.

```

## Parents

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

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