From 67538291a5066a45d98757f3c71fdc34dc438f2d Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Wed, 17 Aug 2011 15:14:37 +0000 Subject: [PATCH] Fix RequestRead operation --- Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs b/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs index 70f0bf5d..338cdfd7 100644 --- a/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs +++ b/Renci.SshClient/Renci.SshNet/Sftp/SftpSession.cs @@ -229,8 +229,8 @@ namespace Renci.SshNet.Sftp var canonizedPath = string.Empty; var realPathFiles = this.RequestRealPath(fullPath, true); - - if ( realPathFiles != null) + + if (realPathFiles != null) { canonizedPath = realPathFiles.Keys.First(); } @@ -370,7 +370,7 @@ namespace Renci.SshNet.Sftp /// data array; null if EOF internal byte[] RequestRead(byte[] handle, UInt64 offset, UInt32 length) { - byte[] data = null; + byte[] data = new byte[0]; using (var wait = new AutoResetEvent(false)) {