mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-07-15 13:35:24 +00:00
An exception occurred in ReadOnlySubStream when attempting to set the position to the same value.
This commit is contained in:
@@ -13,7 +13,7 @@ internal class ReadOnlySubStream : NonDisposingStream
|
||||
public ReadOnlySubStream(Stream stream, long? origin, long bytesToRead)
|
||||
: base(stream, throwOnDispose: false)
|
||||
{
|
||||
if (origin != null)
|
||||
if (origin != null && stream.Position != origin.Value)
|
||||
{
|
||||
stream.Position = origin.Value;
|
||||
}
|
||||
@@ -31,7 +31,7 @@ internal class ReadOnlySubStream : NonDisposingStream
|
||||
|
||||
public override void Flush() { }
|
||||
|
||||
public override long Length => throw new NotSupportedException();
|
||||
public override long Length => base.Length;
|
||||
|
||||
public override long Position
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user