mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-11 01:36:39 +00:00
Merge pull request #186 from agayardo/develop
Fix for recently introduced regression in SftpFileStream.Read(...).
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user