-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
dotnet/corefx
#37601Labels
area-System.IO.Compressionbugtenet-compatibilityIncompatibility with previous versions or .NET FrameworkIncompatibility with previous versions or .NET Framework
Milestone
Description
When a zip archive is created some files can have DataDescriptor after LocalFileHeader and compressed data. It is indicated by the flag ZipArchiveEntry.BitFlagValues.DataDescriptor.
The update method in ZipArchive does not clear DataDescriptor flag and also does not write DataDescriptor after compressed data.
In Windows 10 the archive can be opened and files can be extracted, but when I try to add any file then the system reports that the archive is broken.
Steps to reproduce:
- create zip file using ZipArchive (ZipArchiveMode.Create) and stream that cannot Seek (in order to use DataDescriptor)
- add at least two not empty files with default compression
- save the archive
- open the created zip file using ZipArchive (ZipArchiveMode.Update)
- modify one file in the archive
- save the archive
- open the archive in Windows 10 using File Explorer
- add a file to the archive (use drag & drop)
- Windows reports that the archive is corrupted
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.IO.Compressionbugtenet-compatibilityIncompatibility with previous versions or .NET FrameworkIncompatibility with previous versions or .NET Framework