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

Unzipping tar.gz flattens files to have no more than 1 directory #165

Closed
asdf23 opened this issue Jan 20, 2017 · 2 comments
Closed

Unzipping tar.gz flattens files to have no more than 1 directory #165

asdf23 opened this issue Jan 20, 2017 · 2 comments

Comments

@asdf23
Copy link

asdf23 commented Jan 20, 2017

I have a nested tar.gz file. I can extract these files using cygwin/tar no problem.
In SharpZipLib I'm doing the following:

{
	// fileGitBlog is a FileInfo object pointing to tar.gz file
	using (Stream sourceStream = new GZipInputStream(fileGitBlob.OpenRead()))
	{
		using (TarArchive tarArchive = TarArchive.CreateInputTarArchive(sourceStream))
		{
			tarArchive.ExtractContents(@"c:\temp\somewhere\");
		}
	}
}

Expected behavior

I expect to see the same results as cygwin, which is a directory structure populated with files

    SomeDir1\
    SomeDir1\SomeDir1a\
    SomeDir1\SomeDir1a\someFiles.txt
    SomeDir2\
    SomeDir2\SomeDir2a\someFiles.txt

Actual behavior

    SomeDir1\
    SomeDir1a\someFiles.txt
    SomeDir2\
    SomeDir2a\someFiles.txt

Version of SharpZipLib

SharpZipLib 0.86.0

Obtained from (place an x between the brackets for all that apply)

  • Package installed using:
    • NuGet
@piksel
Copy link
Member

piksel commented Sep 16, 2018

This seems odd. Nested directories should work. Could you provide a sample file?

@piksel
Copy link
Member

piksel commented Nov 22, 2020

Closing this as unable to reproduce. Could be caused by #38/#338.

@piksel piksel closed this as completed Nov 22, 2020
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