mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
WriterFactory for Tar GZip now creates corrupt archive #243
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Lukazoid on GitHub (Sep 29, 2017).
Originally assigned to: @adamhathcock on GitHub.
Given the following code:
I would expect this code to write
File1.txtand thenFile2.txtto the console which it does for all versions of SharpCompress between 0.11.5 and 0.17.1, I am also able to extract from the created archive using 7-zip.For versions 0.18.0, 0.18.1 and 0.18.2 the above code only outputs a single null value. I am also unable to extract the contents from the created archive using 7-zip.
It appears that this is an issue with the WriteFactory when using Tar GZip.
@turbolocust commented on GitHub (Apr 5, 2018):
I can confirm this. Using the following code example the produced archive is corrupt:
I can open it with WinRAR, but it says "Unexpected end of archive; The archive is corrupt". This does not happen when using other compression types, e.g. BZip2. Also, the extraction with the API works fine but the extracted files might be corrupt as well.
@turbolocust commented on GitHub (May 25, 2018):
Release 0.21.x seems to have fixed this issue. I tested this with a simple text file. Under 0.20 the bug is still there but it's gone with the latest version. So this issue can be closed I guess.
@Lukazoid commented on GitHub (May 26, 2018):
Can confirm, my example seems to work with 0.21.x.