Closed
Description
Description
Bug found while investigating this issue: #70509
TarReader.GetNextEntry
is unable to retrieve entries that have the path set to ./
.
Reproduction Steps
string targetPath = "D:/some/destination";
using FileStream compressedStream = File.OpenRead(@"D:/path/to/dotnet-runtime-6.0.5-osx-x64.tar.gz");
using GZipStream decompressor = new(compressedStream, CompressionMode.Decompress);
TarFile.ExtractToDirectory(source: decompressor, destinationDirectoryName: targetPath, overwriteFiles: true);
Expected behavior
The archive is extracted.
Actual behavior
System.IO.IOException : Extracting the Tar entry './' would have resulted in a file outside the specified destination directory: 'C:\Users\carlos\AppData\Local\Temp\zm5gtquh.qu5\'
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response