mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
Failed to extract .tar.gz file #371
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 @fabriciasantos on GitHub (Aug 29, 2019).
I am trying to extract a .tar.gz file and it throws an exception such as:
Value cannot be null.
Parameter Name: path2
Code:
var file = @"C:\data\base.tar.gz";var file = @"C:\data\base.tar.gz";var caminhoArquivo = @"C:\data\teste\";using (var stream = File.OpenRead(file)){using (var archive = ArchiveFactory.Open(stream)){var teste = archive.Entries.Count();foreach (var entry in archive.Entries.Where(entry => !entry.IsDirectory)){entry.WriteToDirectory(caminhoArquivo, new ExtractionOptions(){ExtractFullPath = true,Overwrite = true});}}}@turbolocust commented on GitHub (Jan 25, 2020):
Could you please provide the full stack trace as text? If possible, a copy of the archive file would also be great for further investigation.