You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.425
Former-commit-id: 56934f10a9ad11e3eb75c21da859e02f54766140
This commit is contained in:
parent
693afccc61
commit
2927bc3cc3
@ -227,13 +227,20 @@ namespace System.IO.Compression
|
||||
|
||||
private void Save()
|
||||
{
|
||||
using (var newZip = new MemoryStream()) {
|
||||
zipFile.SaveTo(newZip, CompressionType.Deflate, entryNameEncoding ?? Encoding.UTF8);
|
||||
if (mode == ZipArchiveMode.Create)
|
||||
{
|
||||
zipFile.SaveTo(stream, CompressionType.Deflate, entryNameEncoding ?? Encoding.UTF8);
|
||||
}
|
||||
else {
|
||||
using (var newZip = new MemoryStream())
|
||||
{
|
||||
zipFile.SaveTo(newZip, CompressionType.Deflate, entryNameEncoding ?? Encoding.UTF8);
|
||||
|
||||
stream.SetLength(0);
|
||||
stream.Position = 0;
|
||||
newZip.Position = 0;
|
||||
newZip.CopyTo(stream);
|
||||
stream.SetLength(0);
|
||||
stream.Position = 0;
|
||||
newZip.Position = 0;
|
||||
newZip.CopyTo(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user