# don't close cache manifest file prematurely · gitcafe/zig

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

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

Visibility: public

Requested revision: 93e89b3b7efeaa41f4f11fbb022b962d2244dab2

Requested commit: 93e89b3b7efeaa41f4f11fbb022b962d2244dab2

Commit: 93e89b3b7efeaa41f4f11fbb022b962d2244dab2

Tree: 34229967212bca0f7ae05d6d34f91483cc4758dc

Author: Ben Noordhuis

Committer: Ben Noordhuis

## Message

```
don't close cache manifest file prematurely

ErrorInvalidFormat is not a fatal error so don't close the cache
manifest file right away but instead let cache_final() handle it.

Fixes the following (very common) warning when running the test suite:

    Warning: Unable to write cache file [..]: unexpected seek failure

The seek failure is an lseek() system call that failed with EBADF
because the file descriptor had already been closed.

```

## Parents

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

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