another fix

This commit is contained in:
Adam Hathcock
2026-01-31 14:20:01 +00:00
parent 7112dba345
commit 895dd02830
2 changed files with 0 additions and 15 deletions

View File

@@ -80,19 +80,12 @@ public class ZipFactory
var startPosition = stream.CanSeek ? stream.Position : -1;
// probe for single volume zip
if (stream is not SharpCompressStream) // wrap to provide buffer bef
{
stream = new SharpCompressStream(stream, bufferSize: Constants.BufferSize);
}
if (await ZipArchive.IsZipFileAsync(stream, password, cancellationToken))
{
return true;
}
// probe for a multipart zip
if (!stream.CanSeek)
{
return false;

View File

@@ -10,7 +10,6 @@ internal partial class RewindableStream : Stream
private bool isRewound;
private bool isDisposed;
private long streamPosition;
private bool _hasStoppedRecording;
public RewindableStream(Stream stream) => this.stream = stream;
@@ -47,7 +46,6 @@ internal partial class RewindableStream : Stream
"StopRecording can only be called when recording is active."
);
}
_hasStoppedRecording = true;
isRewound = true;
IsRecording = false;
bufferStream.Position = 0;
@@ -74,12 +72,6 @@ internal partial class RewindableStream : Stream
"StartRecording can only be called when not already recording."
);
}
if (_hasStoppedRecording)
{
throw new InvalidOperationException(
"StartRecording cannot be called after StopRecording has been called."
);
}
//if (isRewound && bufferStream.Position != 0)
// throw new System.NotImplementedException();
if (bufferStream.Position != 0)