Merge pull request #186 from agayardo/develop

Fix for recently introduced regression in SftpFileStream.Read(...).
This commit is contained in:
Gert Driesen
2017-03-05 18:47:47 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
@@ -36,6 +36,8 @@ namespace Renci.SshNet.Abstractions
/// <param name="action">The action to execute.</param>
public static void ExecuteThread(Action action)
{
if (action == null)
throw new ArgumentNullException("action");
#if FEATURE_THREAD_THREADPOOL
System.Threading.ThreadPool.QueueUserWorkItem(o => action());
#elif FEATURE_THREAD_TAP
+1 -1
View File
@@ -372,7 +372,7 @@ namespace Renci.SshNet.Sftp
{
// copy remaining bytes to read buffer
_bufferLen = data.Length - bytesToWriteToCallerBuffer;
Buffer.BlockCopy(data, count, _readBuffer, 0, _bufferLen);
Buffer.BlockCopy(data, bytesToWriteToCallerBuffer, _readBuffer, 0, _bufferLen);
}
}
else