internal void AcquireArchiveStream(ZipArchiveEntry entry)
{
//if a previous entry had held the stream but never wrote anything, we write their local header for them
if (_archiveStreamOwner != null)
{
if (!_archiveStreamOwner.EverOpenedForWrite)
{
_archiveStreamOwner.WriteAndFinishLocalEntry();
}
else
{
throw new IOException(SR.CreateModeCreateEntryWhileOpen);
}
}
_archiveStreamOwner = entry;
}