Open snoyberg opened 6 years ago
Blocks snoyberg/pantry#1
This issue is caused by pax
format and improper discarding of unsupported headers. The very first header in the archive is of type g
and it describes a special file: pax_global_header
with payload containing info specific to that format. Since it is not supported the header is simply discarded, but the payload following the header isn't, thus causing a UnexpectedPayload
error. Solution would be for unsupported headers to also look at the size and if it's not zero to discard the associated payload.
I suspect this issue would also disappear if #13 would get implemented, but adding proper discarding described in above comment is still a suggested solution for unknown/custom headers.
As a simple repro:
Results in:
Use case: I'm trying to unpack all of Hackage into an SQLite database in snoyberg/pantry.