Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
AbstractReader.Skip() does not fully read bytes from non-local streams #275
for (var i = 0; i < bytesToAdvance / skipBuffer.Length; i++)
this code assume rawStream.Read always read until requested count.
but if you test with remote stream (from network like ftp), MoveToNextEntry() throw Unknown header exception. because skip function do not actually skip.
i fixed code like this, and it works fine for me.
please let me know if it is not a bug.
You're probably correct in that I have some bad skip code. I've noticed recently there are several different implementations of this kind of thing in the codebase. I need to consolidate this at the very least.
I have Skip/Transfer code in Utility.cs that probably should be used instead and does what you're referring to.
I likely won't get time for a while to fix this but pull requests are welcome :)