Skip to content

Conversation

@dellis1972
Copy link
Contributor

There is a small bug in the zip extraction. We were using
FileMode.OpenOrCreate to write the files. The problem is
OpenOrCreate does not truncate the file if it exists. So
if we have a resource which is smaller than the file on disk
we end up with additonal stuff at the end of it..

So lets use Create instead which will truncate the file
if it exists aleady.

There is a small bug in the zip extraction. We were using
`FileMode.OpenOrCreate` to write the files. The problem is
`OpenOrCreate` does not truncate the file if it exists. So
if we have a resource which is smaller than the file on disk
we end up with additonal stuff at the end of it..

So lets use `Create` instead which will truncate the file
if it exists aleady.
@jonpryor jonpryor merged commit 423ae68 into dotnet:master Sep 12, 2017
jonpryor pushed a commit that referenced this pull request Sep 13, 2017
)

There is a small bug in the zip extraction. We were using
`FileMode.OpenOrCreate` to write the files. The problem is
`OpenOrCreate` does not truncate the file if it exists. So
if we have a resource which is smaller than the file on disk
we end up with additonal stuff at the end of it..

So lets use `Create` instead which will truncate the file
if it exists aleady.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants