From 39e30765c116a026ccb9b991a5a89a89117786f8 Mon Sep 17 00:00:00 2001 From: olegkap_cp Date: Thu, 10 Jan 2013 14:28:53 +0000 Subject: [PATCH] Fix SCP hanging when downloading single file into directory --- Renci.SshClient/Renci.SshNet/ScpClient.NET.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Renci.SshClient/Renci.SshNet/ScpClient.NET.cs b/Renci.SshClient/Renci.SshNet/ScpClient.NET.cs index 371b4bf1..66ecbe8b 100644 --- a/Renci.SshClient/Renci.SshNet/ScpClient.NET.cs +++ b/Renci.SshClient/Renci.SshNet/ScpClient.NET.cs @@ -226,11 +226,9 @@ namespace Renci.SshNet currentDirectoryFullName = new DirectoryInfo(currentDirectoryFullName).Parent.FullName; - //if (currentDirectoryFullName == startDirectoryFullName) if (directoryCounter == 0) break; - else - continue; + continue; } var match = _directoryInfoRe.Match(message); @@ -284,9 +282,8 @@ namespace Renci.SshNet fileInfo.LastAccessTime = accessedTime; fileInfo.LastWriteTime = modifiedTime; - if (fileSystemInfo is FileInfo) + if (directoryCounter == 0) break; - continue; }