Ver Fonte

Remove quotes when using SCP to download or upload

olegkap_cp há 14 anos atrás
pai
commit
81b9e21b8f
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      Renci.SshClient/Renci.SshNet/ScpClient.NET.cs

+ 2 - 2
Renci.SshClient/Renci.SshNet/ScpClient.NET.cs

@@ -36,7 +36,7 @@ namespace Renci.SshNet
                 channel.Open();
 
                 //  Send channel command request
-                channel.SendExecRequest(string.Format("scp -qt \"{0}\"", filename));
+                channel.SendExecRequest(string.Format("scp -qt {0}", filename));
                 this.CheckReturnCode(input);
 
                 this.InternalUpload(channel, input, fileInfo, filename);
@@ -120,7 +120,7 @@ namespace Renci.SshNet
                 channel.Open();
 
                 //  Send channel command request
-                channel.SendExecRequest(string.Format("scp -qprf \"{0}\"", directoryName));
+                channel.SendExecRequest(string.Format("scp -qprf {0}", directoryName));
                 this.SendConfirmation(channel); //  Send reply
 
                 this.InternalDownload(channel, input, directoryInfo);