Bug? - ZipArchive modifies underlying stream even if no archive changes made #34506
Labels
area-System.IO.Compression
help wanted
[up-for-grabs] Good issue for external contributors
in-pr
There is an active PR which will close this issue when it is merged
Milestone
If a
ZipArchive
instance is created withZipArchiveMode.Update
then disposed without being used to modify the archive, the underlying stream is still modified. If that underlying stream is aFileStream
, this results in the associated file's modified timestamp being updated.In contrast,
FileStream
does not exhibit this behavior. Simply opening a modifiableFileStream
does not change the underlying file's modified timestamp.Is how
ZipArchive
modifies its backing stream even when the archive is unmodified by the user a bug or a feature? :-)What would be the chances of
ZipArchive
's manners being improved to avoid modifying its backing stream in this case?Thanks!
-- dotnet version: 3.1.200
The text was updated successfully, but these errors were encountered: