Skip to content

Commit cea61f0

Browse files
committed
Eliminate use of Linq.
1 parent 496eba2 commit cea61f0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Renci.SshNet/Sftp/SftpSession.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Linq;
32
using System.Text;
43
using System.Threading;
54
using Renci.SshNet.Common;
@@ -90,7 +89,7 @@ public string GetCanonicalPath(string path)
9089

9190
if (realPathFiles != null)
9291
{
93-
canonizedPath = realPathFiles.First().Key;
92+
canonizedPath = realPathFiles[0].Key;
9493
}
9594

9695
if (!string.IsNullOrEmpty(canonizedPath))
@@ -114,7 +113,7 @@ public string GetCanonicalPath(string path)
114113

115114
if (realPathFiles != null)
116115
{
117-
canonizedPath = realPathFiles.First().Key;
116+
canonizedPath = realPathFiles[0].Key;
118117
}
119118

120119
if (string.IsNullOrEmpty(canonizedPath))
@@ -158,7 +157,7 @@ protected override void OnChannelOpen()
158157
}
159158

160159
// Resolve current directory
161-
WorkingDirectory = RequestRealPath(".").First().Key;
160+
WorkingDirectory = RequestRealPath(".")[0].Key;
162161
}
163162

164163
protected override void OnDataReceived(byte[] data)

0 commit comments

Comments
 (0)