From cea61f0573f85158920232a5d002cbfb9cbc9579 Mon Sep 17 00:00:00 2001 From: drieseng Date: Fri, 16 Dec 2016 12:33:34 +0100 Subject: [PATCH] Eliminate use of Linq. --- src/Renci.SshNet/Sftp/SftpSession.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Renci.SshNet/Sftp/SftpSession.cs b/src/Renci.SshNet/Sftp/SftpSession.cs index 2caa4a8c..8a3c6773 100644 --- a/src/Renci.SshNet/Sftp/SftpSession.cs +++ b/src/Renci.SshNet/Sftp/SftpSession.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; using System.Text; using System.Threading; using Renci.SshNet.Common; @@ -90,7 +89,7 @@ namespace Renci.SshNet.Sftp if (realPathFiles != null) { - canonizedPath = realPathFiles.First().Key; + canonizedPath = realPathFiles[0].Key; } if (!string.IsNullOrEmpty(canonizedPath)) @@ -114,7 +113,7 @@ namespace Renci.SshNet.Sftp if (realPathFiles != null) { - canonizedPath = realPathFiles.First().Key; + canonizedPath = realPathFiles[0].Key; } if (string.IsNullOrEmpty(canonizedPath)) @@ -158,7 +157,7 @@ namespace Renci.SshNet.Sftp } // Resolve current directory - WorkingDirectory = RequestRealPath(".").First().Key; + WorkingDirectory = RequestRealPath(".")[0].Key; } protected override void OnDataReceived(byte[] data)