Ver código fonte

Fix SCP to allow specify folder/path as destination when coping files

olegkap_cp 13 anos atrás
pai
commit
d8fbf2c81b
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      Renci.SshClient/Renci.SshNet/ScpClient.cs

+ 1 - 1
Renci.SshClient/Renci.SshNet/ScpClient.cs

@@ -234,7 +234,7 @@ namespace Renci.SshNet
         {
             var length = source.Length;
 
-            this.SendData(channel, string.Format("C0644 {0} {1}\n", length, filename));
+            this.SendData(channel, string.Format("C0644 {0} {1}\n", length, Path.GetFileName(filename)));
 
             var buffer = new byte[this.BufferSize];