Skip to content
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

Incorrect documented IOException in ZipFile.ExtractToDirectory #53609

Closed
pkanavos opened this issue Jun 2, 2021 · 3 comments · Fixed by #55762
Closed

Incorrect documented IOException in ZipFile.ExtractToDirectory #53609

pkanavos opened this issue Jun 2, 2021 · 3 comments · Fixed by #55762
Labels
area-System.IO.Compression documentation Documentation bug or enhancement, does not impact product or test code help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@pkanavos
Copy link

pkanavos commented Jun 2, 2021

In ZipFile.ExtractToDirectory and ZipFileExtensions.ExtractToDirectory, the remarks and documentation say that IOException is thrown if the destination directory already exists. This is incorrect, as the method that's eventually called, the internal ExtractRelativeToDirectory method works fine with existing destination folders.

This was first asked in this SO question. I also opened an issue in the dotnett-api-docs repo

/// <exception cref="IOException">The directory specified by destinationDirectoryName already exists.

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.IO.Compression untriaged New issue has not been triaged by the area owner labels Jun 2, 2021
@ghost
Copy link

ghost commented Jun 2, 2021

Tagging subscribers to this area: @carlossanlop
See info in area-owners.md if you want to be subscribed.

Issue Details

In ExtractToDirectory, the remarks and documentation say that IOException is thrown if the destination directory already exists. This is incorrect, as the method that's eventually called, the internal ExtractRelativeToDirectory method works fine with existing destination folders.

This was first asked in this SO question

/// <exception cref="IOException">The directory specified by destinationDirectoryName already exists.

Author: pkanavos
Assignees: -
Labels:

area-System.IO.Compression, untriaged

Milestone: -

@adamsitnik
Copy link
Member

Hi @pkanavos

Would you like to contribute a PR where you would remove the remark and add a test that ensures that it's true?

Thanks!

@Jozkee
Copy link
Member

Jozkee commented Jun 23, 2021

@pkanavos for System.IO.Compression namespace, the source of truth of documentation is the triple-slash comments in our source, can you please send the PR to this repo (dotnet/runtime) instead? We will port it to dotnet-api-docs ourselves, it's going to be automated soon.

cc @carlossanlop

@jeffhandley jeffhandley added documentation Documentation bug or enhancement, does not impact product or test code help wanted [up-for-grabs] Good issue for external contributors and removed untriaged New issue has not been triaged by the area owner labels Jul 13, 2021
@jeffhandley jeffhandley added this to the 6.0.0 milestone Jul 13, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 15, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 24, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO.Compression documentation Documentation bug or enhancement, does not impact product or test code help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants