Fix bug in ZipArchiveEntry data descriptor (dotnet/corefx#37601)
authorCarlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com>
Tue, 14 May 2019 21:26:12 +0000 (14:26 -0700)
committerGitHub <noreply@github.com>
Tue, 14 May 2019 21:26:12 +0000 (14:26 -0700)
commit1ddeb707ac6134b944a3e1ede218c845d092e24e
tree28c1533abecd7c7ce50c3d4a715a058be93ccc63
parentb5ded1b5e6ead5b0620ab644588f659c48dc36ed
Fix bug in ZipArchiveEntry data descriptor (dotnet/corefx#37601)

* Prevent data corruption (can't drag drop files using external zip tools) when data descriptor bit is turned on in a seekable file that is being updated.

* Add unit test to verify data descriptor is off after updating a zip file that was created with an unseekable stream.

Commit migrated from https://github.com/dotnet/corefx/commit/05ada9bc9674ef874666260c14a01187deee8040
src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs
src/libraries/System.IO.Compression/tests/ZipArchive/zip_CreateTests.cs