-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Tar entries should be able to handle paths that begin with "./", including the root path itself #70516
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsDescriptionBug found while investigating this issue: #70509
Reproduction Stepsstring 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 behaviorThe archive is extracted. Actual behavior
Regression?No response Known WorkaroundsNo response ConfigurationNo response Other informationNo response
|
The prefix
This usually happens when the file is added by tabbing for autocomplete. The prefix is not added if you use
So to add the
Which would add all the files in the current directory (excluding the tar archive you're creating), will prepend the When you open such archive with 7-zip, it shows at the root a single directory entry named |
Description
Bug found while investigating this issue: #70509
TarReader.GetNextEntry
is unable to retrieve entries that have the path set to./
.Reproduction Steps
Download https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.5-servicing.22213.9/dotnet-runtime-6.0.5-osx-x64.tar.gz
Expected behavior
The archive is extracted.
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: