Commit graph

24 commits

Author SHA1 Message Date
Richard Feldman
117448f347
Fix double-close crash in downloadToFile error handling
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.
2025-12-13 17:51:14 -05:00
Richard Feldman
648562a0fb
Add test reproducing double-close crash in downloadToFile
When an HTTP fetch fails, downloadToFile explicitly closes the file
before returning an error. The error return then triggers the errdefer
block which tries to close the file again, causing a crash.

This test uses an unreachable URL (localhost port 1) to trigger the
HTTP error path and reproduce the double-close bug.
2025-12-13 17:49:34 -05:00
Richard Feldman
799dada6a0
Delete a ton of unused arguments 2025-12-04 01:45:48 -05:00
Luke Boswell
7b9e70e882
fix unbundle writer impl 2025-11-29 22:34:31 +11:00
Luke Boswell
71ec6b49cb
mitigate tmp filename collisions 2025-11-28 13:32:09 +11:00
Luke Boswell
8f274a0a56
support for URL packages 2025-11-27 15:57:35 +11:00
Luke Boswell
b431ad3dc7
update unbundle using zig stdlib 2025-11-27 11:25:22 +11:00
Anton-4
6de737da43
fmt 2025-10-01 20:09:06 +02:00
Anton-4
e97a9092dc
forgot some deprecated things 2025-10-01 16:43:52 +02:00
Anton-4
b127b29d24
get rid of all deprecated things 2025-10-01 15:52:56 +02:00
Anton-4
e520efc01a
get rid of depracatedWriter/Reader 2025-09-27 18:36:01 +02:00
Isaac Van Doren
625d0907a6
WIP upgrade readers and writers in bundle/unbundle 2025-09-14 22:21:07 -05:00
Isaac Van Doren
cb12480d89
Revert "Upgrade readers and writers in unbundle"
This reverts commit ae54c9ae26.
2025-09-14 20:47:47 -05:00
Isaac Van Doren
ae54c9ae26
Upgrade readers and writers in unbundle 2025-09-07 20:35:28 -05:00
Isaac Van Doren
6f12f0d478
Update to new zstd decompression api 2025-09-07 20:35:28 -05:00
Isaac Van Doren
30a65a96a7
rename std.ArrayList to std.array_list.Managed 2025-09-06 20:47:40 -05:00
Richard Feldman
720727b038
Fix CI 2025-08-15 15:36:25 -04:00
Richard Feldman
1f12fa8bbb
Remove unnecessary FinishFileError 2025-08-15 14:34:01 -04:00
Richard Feldman
245b41941c
Add unbundle tests 2025-08-15 14:14:47 -04:00
Richard Feldman
51ac18b694
There is no longer a max_tar_size field 2025-08-15 12:23:37 -04:00
Richard Feldman
7da886baaa
Document ZSTD_WINDOW_BUFFER_SIZE 2025-08-15 12:17:04 -04:00
Richard Feldman
27c008e099
Fix some APIs 2025-08-15 11:22:47 -04:00
Richard Feldman
9d02826985
Give base58 its own module 2025-08-13 08:20:06 -04:00
Richard Feldman
a8dadea7dd
Split out unbundle, use Zig's zstd for wasm 2025-08-13 07:58:50 -04:00