Browse Source

Avoid using Linq where a more performant alternative is readily available.

drieseng 9 years ago
parent
commit
3ab6ee413f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Renci.SshNet/Sftp/SftpFileAttributes.cs

+ 1 - 1
src/Renci.SshNet/Sftp/SftpFileAttributes.cs

@@ -417,7 +417,7 @@ namespace Renci.SshNet.Sftp
                 throw new ArgumentOutOfRangeException("mode");
             }
 
-            var modeBytes = mode.ToString(CultureInfo.InvariantCulture).PadLeft(3, '0').ToArray();
+            var modeBytes = mode.ToString(CultureInfo.InvariantCulture).PadLeft(3, '0').ToCharArray();
 
             var permission = (modeBytes[0] & 0x0F) * 8 * 8 + (modeBytes[1] & 0x0F) * 8 + (modeBytes[2] & 0x0F);