mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
When HTTP fetch or flush failed, the code explicitly closed the file and deleted it before returning an error. But returning an error also triggered the errdefer block which tried to close the file again, causing a crash on Windows where CloseHandle asserts success. The fix removes the explicit close/delete calls in error paths since the errdefer already handles cleanup. The errdefer pattern is the correct way to handle this - it ensures cleanup happens exactly once whether we return normally or with an error. |
||
|---|---|---|
| .. | ||
| download.zig | ||
| mod.zig | ||
| test_unbundle.zig | ||
| unbundle.zig | ||