Overview
Artifact ID: | 8b18893c196b9f60fdefd1c8f4febdca7ac3b887501f795f7ea8a3791498b5d5 |
---|---|
Ticket: | b01462dff791ba84ecf444d01281412d781bdfbb
untar: expected integer but got a list |
User & Date: | aku 2025-01-14 22:07:34 |
Changes
- icomment:
My thought that this was an encoding issue was wrong. The `iso8859-1` encoding used by Tcl 9 is correct. The issue is indeed one of octal conversion, and Ashok's change is a fix. Basically, using pre-patch `set x [format %d 0[string trim [set $x] " \x00"]]` mis-converts the size information found in the first header. With the size wrong the code looks at the wrong place in the file for the next header, reads bogus data, and then chokes on that. With the patch applied (`set x [format %d 0o0[string trim [set $x] " \x00"]]`) the conversion to decimal is done correctly, and the next header is read and processed ok, and so on, to the end of the tar file. Using the `cantrbry.tar` file the code reads ``` |size| |00000451031| ``` and mis-converts to ``` |size| |451031|DECIMAL ``` No conversion was done at all. With the path on the other hand we get ``` |size| |152089|DECIMAL ``` which is correct. And with that I have confirmed the issue, understood the issue, confirmed and understood the fix, and can now extend the testsuite.
- login: "aku"
- mimetype: "text/x-markdown"