While enumerating the entries of a tar file and writing their contents
to disk using TarArchive, it was discovered TarArchive was not properly
discarding padding bytes in the last block of each entry. TarArchive was
sometimes able to recover depending on the number of padding bytes due
to the logic it uses to find the next entry header, but not always.
TarArchive was changed to use TarReadOnlySubStream when opening entries
and TarReadOnlySubstream was changed to ensure all an entry's blocks are
read when it is being disposed.
Fixesadamhathcock/sharpcompress#524
Extended SharpCompress.Common.ExtractionOptions with a delegate to write symbolic links. If not is null, and a symbolic link is encountered, an exception is thrown.
Removed Mono.Posix.NETStandard from the library, but added to the .NET Core 2.1 test application.
Extended the test to implement the delegate.
This is a source archive of the MoltenVK project from github, which is my use-case for SharpCompress.
I added a test case in the project, which should extract the tar, and validate any symlink targets with what the tar thinks it ought to be.
Currently, when ArchiveFactory.Open is called on an empty tar archive, it throws due to being unable to determine the stream type. This fix allows it to recognise empty tar files by checking for whether the filename is empty, the size is empty and the entry type is defined. Add a test to try opening an empty archive.
Tests fail in Visual Studio because they try to reuse the same scratch
working space, and each test is responsible for resetting the space. To
simplify the test code:
1. Make `TestBase` `IDisposable` and have it create the scratch space
2. Remove `ResetScratch()` as it is now handled by the base class
3. Add a unique ID to each scrach space folder to prevent collisions
* Add netstandard 2.0 target and netcoreapp2.0 tests
* Update xunit
* set tests explicitly to netcore2
* update travis
* Don't say build as netcoreapp1.0
* try adding dotnet 1 too
* Remove .NET Core 1 support
* switch to circle
* update cake
* fix circle build
* try fix file ending test again
* Fix casing on files
* Another casing fix
* Add back netstandard1.0
* Finish adding netstandard 1.0 back
* Add netstandard1.3 back
* First pass. Writing isn't implemented on stream. Tests are busted.
* LZipReader works...no file name :(
* LZipWriter works
* Writing tests are actually correct now. LZipStream correctly writes trailer now. lzip command line tool likes it.
* Add recommendation blurb
* Update notes for formats
* LZip isn't an archive format
* Attempting to fix and implement crc32
* LZip writing test passes
* Had to invert crc to check uncompressed data.