mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-11 01:36:39 +00:00
Enclode filename in quotes for SCP operation as recomended
This commit is contained in:
@@ -45,7 +45,8 @@ 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);
|
||||
@@ -82,7 +83,7 @@ namespace Renci.SshNet
|
||||
channel.Open();
|
||||
|
||||
// Send channel command request
|
||||
channel.SendExecRequest(string.Format("scp -qrt {0}", filename));
|
||||
channel.SendExecRequest(string.Format("scp -qrt \"{0}\"", filename));
|
||||
this.CheckReturnCode(input);
|
||||
|
||||
this.InternalUpload(channel, input, directoryInfo, filename);
|
||||
@@ -156,7 +157,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);
|
||||
|
||||
Reference in New Issue
Block a user