Skip to content

Conversation

@iremyux
Copy link
Contributor

@iremyux iremyux commented Nov 3, 2025

This PR updates the API documentation for TarFile and ZipFile ExtractToDirectory methods. It clarifies how symbolic links and junctions are handled during extraction. For TarFile, the docs now state that extraction will throw an IOException if a symbolic link or junction would escape the destination directory. For ZipFile, the docs explain that symbolic link information is not preserved and such entries are extracted as regular folders.

Fixes dotnet/runtime#120966

Copilot AI review requested due to automatic review settings November 3, 2025 13:26
@iremyux iremyux requested a review from a team as a code owner November 3, 2025 13:26
@iremyux iremyux requested a review from rokonec November 3, 2025 13:26
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation about symbolic link and junction handling behavior to the extraction methods in both ZipFile and TarFile APIs.

  • Clarifies that ZIP archives extract symbolic links as regular folders since symbolic link information isn't preserved in the ZIP format
  • Documents that TAR archives throw an IOException when symbolic links or junctions would extract files outside the destination directory

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
xml/System.IO.Compression/ZipFile.xml Added documentation stating that symbolic links in ZIP archives are extracted as regular folders across multiple ExtractToDirectory method overloads
xml/System.Formats.Tar/TarFile.xml Added documentation explaining that symbolic links or junctions pointing outside the destination directory will throw an IOException across multiple ExtractToDirectory method overloads

@iremyux iremyux requested a review from Copilot November 3, 2025 13:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.

@iremyux iremyux requested a review from Copilot November 3, 2025 13:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@gewarren gewarren merged commit e1c055b into dotnet:main Nov 3, 2025
12 checks passed
@iremyux iremyux deleted the zip-tar-extracttodirectory branch November 7, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Update ZipFile and TarFile extract to directory symlink info

2 participants