Skip to content

Fix the stream do not be closed in ImageSourceTypeConverter#7091

Merged
dipeshmsft merged 1 commit intodotnet:mainfrom
dotnet-campus:t/lindexi/ImageSourceTypeConverter
Oct 26, 2022
Merged

Fix the stream do not be closed in ImageSourceTypeConverter#7091
dipeshmsft merged 1 commit intodotnet:mainfrom
dotnet-campus:t/lindexi/ImageSourceTypeConverter

Conversation

@lindexi
Copy link
Member

@lindexi lindexi commented Sep 21, 2022

Fixes #6842

Description

The ImageSourceTypeConverter will request the stream. And the ImageSourceTypeConverter will close the stream after CopyImageStream method. But the stream will not be closed when the CopyImageStream throw the exception.

This will make the ZipArchiveEntry throw the System.IO.IOException: 'Entries cannot be opened multiple times in Update mode.' when we next time to request the stream.

Customer Impact

Maybe this can fix #6842

Regression

None.

Testing

Just CI

Risk

Very low?

Microsoft Reviewers: Open in CodeFlow

@lindexi lindexi requested a review from a team as a code owner September 21, 2022 10:17
@ghost ghost assigned lindexi Sep 21, 2022
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Sep 21, 2022
@ghost ghost requested review from dipeshmsft and singhashish-wpf September 21, 2022 10:17
@ghost ghost added the Community Contribution A label for all community Contributions label Sep 21, 2022
@lindexi lindexi force-pushed the t/lindexi/ImageSourceTypeConverter branch from 50aa5a7 to 3b83172 Compare September 22, 2022 01:40
@anjaligupta-dev anjaligupta-dev self-requested a review October 3, 2022 04:42
@dipeshmsft
Copy link
Member

@lindexi , thanks for the contribution

@lindexi
Copy link
Member Author

lindexi commented Oct 26, 2022

Thank you @dipeshmsft

@ghost ghost locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IOException in ZipArchiveEntry.OpenInUpdateMode when printing

4 participants