Apply Zip encoding patch from GordonJ

This commit is contained in:
Matt Nadareski
2021-09-08 22:52:23 -07:00
parent 00e0663ff3
commit 20b5266c54
4 changed files with 27 additions and 5 deletions

View File

@@ -17,11 +17,19 @@ namespace SabreTools.IO
// If the stream is null, don't even try
if (input == null)
return -1;
// If the input is not seekable, just return the current position
if (!input.CanSeek)
return input.Position;
{
try
{
return input.Position;
}
catch
{
return -1;
}
}
// Attempt to seek to the offset
try
{