using (Stream stream = File.OpenRead(file))
using (IReader reader = ReaderFactory.Open(stream))
{
while (reader.MoveToNextEntry())
{
if (!reader.Entry.IsDirectory)
{
reader.WriteEntryToDirectory(outputFolder, new ExtractionOptions
{
ExtractFullPath = true, Overwrite = true
});
}
}
}
An ArgumentException with "Value cannot be null. (Parameter 'path2')" occurs here:
at System.IO.Path.Combine(String path1, String path2) in System.IO\Path.cs:line 316
at SharpCompress.Common.ExtractionMethods.WriteEntryToDirectory(IEntry entry, String destinationDirectory, ExtractionOptions options, Action`2 write) in SharpCompress.Common\ExtractionMethods.cs:line 31
at SharpCompress.Readers.IReaderExtensions.WriteEntryToDirectory(IReader reader, String destinationDirectory, ExtractionOptions options) in SharpCompress.Readers\IReaderExtensions.cs:line 32
The file can be opened with 7Zip. Your library can cope with comparable files. Any help is appreciated.
Opening the attached file with this code fails:
An ArgumentException with "Value cannot be null. (Parameter 'path2')" occurs here:
at System.IO.Path.Combine(String path1, String path2) in System.IO\Path.cs:line 316 at SharpCompress.Common.ExtractionMethods.WriteEntryToDirectory(IEntry entry, String destinationDirectory, ExtractionOptions options, Action`2 write) in SharpCompress.Common\ExtractionMethods.cs:line 31 at SharpCompress.Readers.IReaderExtensions.WriteEntryToDirectory(IReader reader, String destinationDirectory, ExtractionOptions options) in SharpCompress.Readers\IReaderExtensions.cs:line 32
The file can be opened with 7Zip. Your library can cope with comparable files. Any help is appreciated.
03069284-040101.tgz