Home › Forums › .NET libraries › Xceed Zip & Real-Time Zip for .NET › Extracting a tar.gz file problems
Imported from legacy forums. Posted by Aaron (had 1481 views)
The following line in your code is incorrect:
Since you want to extract from the archive, you want to copy items from the archive to the destination folder. As such you want to do this:
archive.CopyFilesTo( destination, true, true );
Here we use CopyFilesTo() on the source archive because CopyTo() wouldn’t work since ‘archive’ is a root folder and you can’t copy a root folder itself, only its contents, which CopyFilesTo() does.
Imported from legacy forums. Posted by Diane [Xceed] (had 1089 views)