Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not open tgz file #782

Open
Broeckl opened this issue Nov 21, 2023 · 0 comments
Open

Can not open tgz file #782

Broeckl opened this issue Nov 21, 2023 · 0 comments

Comments

@Broeckl
Copy link

Broeckl commented Nov 21, 2023

Opening the attached file with this code fails:

            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.

03069284-040101.tgz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants