Uh oh!
There was an error while loading. Please reload this page.
[release/7.0] Fix relative symlink support in TarFile - #78470
Conversation
…romDirectory.File.Roundtrip.cs Co-authored-by: David Cantú <dacantu@microsoft.com>
ghost
commented
Nov 16, 2022
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsBackport of #77338 to release/7.0 Customer ImpactTestingRiskIMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
carlossanlop
commented
Nov 16, 2022
Approved by Tactics via email. CI is green. Approved by area owner. No OOB package authoring changes needed. |
carlossanlop
commented
Nov 29, 2022
Branding has been done. Milestone is 7.0.2. CI is green. Signed-off by area owners. Approved by Tactics. No OOB package authoring changes needed. Ready to merge. |
Backport of #77338 to release/7.0
/cc @jozkee@am11
Customer Impact
Path.Combine(destinationDirectory, path)resulted in a path outside of the destination directory. Said Path combination was incorrect since links targets are relative to where the link is located.With this fix, symlinks with relative targets don’t run into unexpected exceptions and their relative target is correctly preserved on extraction.
It is an important scenario as relative symlinks are perhaps the most common kind of symlink for their portability and both issues stated above would mess with that.
Testing
Added tests for relative targets pointing inside (OK) and outside (Throw) the destination directory, combined with the link being in multiple levels of the destination directory.
Risk
Low, System.Formats.Tar is a new feature in 7.0