codedread / bitjs

Binary Tools for JavaScript
MIT License
81 stars 7 forks source link

Untarrer: File path truncated #23

Closed gavindsouza closed 4 years ago

gavindsouza commented 4 years ago

I have logged the Progress Events while unarchiving two different files. I'm not sure what the difference between the two files really is, but one of them always shows up with currentFileName truncated.

File 1:

UnarchiveProgressEvent {type: "progress", currentFilename: "in.upload.test/public/files/hack.png", currentFileNumber: 0, currentBytesUnarchivedInFile: 15974, totalFilesInArchive: 1, …}

File 2:

UnarchiveProgressEvent {type: "progress", currentFilename: "./gavin.upload.test/private/files/500m.mt", currentFileNumber: 0, currentBytesUnarchivedInFile: 104857600, totalFilesInArchive: 1, …}

Initially, I thought it was that the locale wasn't set, but it seems that I get that error (tar: Failed to set default locale) while opening both the files in vim.

expected: "./gavin.upload.test/public/files/hack.png" current: "in.upload.test/public/files/hack.png"

codedread commented 4 years ago

If you can give me a test file (or tell me how to create one) that would be great. TBH, I don't really use the library for untar (just unzip/unrar).

codedread commented 4 years ago

@gavindsouza gentle ping :)

gavindsouza commented 4 years ago

@codedread I'm having a hard time getting my hands on a test file I can share at this moment. I faced different errors on the files I created post that.

I'll close this issue for now, and open it once I find a test tarfile. How does that sound?

codedread commented 4 years ago

Sure - I'm closing, but feel free to re-open if you can repro.