Wrong numbers of entries in TAR archive
See original GitHub issueI created a TAR archive using 7-zip and then proceeded to extract this archive using this project. I both tried to extract the archive given the method using the filepath and the method where I pass a stream of the file, both gives the same error.
Steps to recreate this
- Create a TAR archive using 7-zip (others might work too) containing two or three files
- Run a test with the following code:
using var stream = new FileStream(path, FileMode.Open);
var entries = new Extractor().Extract(string.Empty, stream).ToList();
or
var entries = new Extractor().Extract(path).ToList();
- Verify the number of entries against the number of files added to the TAR archive
- The number of entries in the archive is one less than the number of files added to the archive
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
I have extracted a tar file in the wrong directory
1 Answer. Personally, I would extract the tar file into an empty directory, diff --report-identical-files --recursive --brief the new directory ...
Read more >tar reverse of '--to-command', or: compressing tar entries ...
My motivation comes from dealing with archives containing a large number of large files. I currently tar-gzip them, but then extracting any ...
Read more >TAR files - Wrong Magic Number
I noticed TAR files created by 7-Zip have wrong "Magic number" when viewed by any Hex editor. TAR files usually should have x7573746172 ......
Read more >Why is the md5 hash of the tar-part of a tar.gz via ...
The issue occurs because tar doesn't read every byte from your reader. After hashing each file, you need to empty the reader to...
Read more >GNU tar 1.34.90: 10.1 Reliability
Ideally, when tar is creating an archive, it reads from a file system that is not being modified, and encounters no errors or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Amazing work, I will update our use and try it out next week.
Best regards Jimmy
From: Gabe Stocco @.> Sent: Saturday, January 15, 2022 7:56:34 PM To: microsoft/RecursiveExtractor @.> Cc: Jimmy Byström @.>; Author @.> Subject: Re: [microsoft/RecursiveExtractor] Wrong numbers of entries in TAR archive (Issue #72)
Closed #72https://github.com/microsoft/RecursiveExtractor/issues/72 via #73https://github.com/microsoft/RecursiveExtractor/pull/73.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/RecursiveExtractor/issues/72#event-5899387090, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA2BXQBWXBYGWME7ACYQI7LUWG7OFANCNFSM5LWDYOTQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>
Hope to merge a fix this week. I first need to double check this issue isn’t present in some of the other extractors.