# stage1: fix \`wasi_snapshot_preview1_fd_seek\` on cache files · gitcafe/zig

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

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

Visibility: public

Requested revision: ceb84c647b5cf6ad6a17b829a78e1c079a6ab5a5

Requested commit: ceb84c647b5cf6ad6a17b829a78e1c079a6ab5a5

Commit: ceb84c647b5cf6ad6a17b829a78e1c079a6ab5a5

Tree: 83afdd3b230ba1f28b4a51a5862f73dcf1a68e68

Author: mlugg

Committer: Alex Rønne Petersen

## Message

```
stage1: fix `wasi_snapshot_preview1_fd_seek` on cache files

`wasm2c` uses an interesting mechanism to "fake" the existence of cache
directories. However, `wasi_snapshot_preview1_fd_seek` was not correctly
integrated with this system, so previously crashed when run on a file in
a cache directory due to trying to call `fseek` on a `FILE *` which was
`NULL`.

```

## Parents

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

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