Explorar o código

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

drieseng %!s(int64=9) %!d(string=hai) anos
pai
achega
3ab6ee413f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);