I was testing the uploading of whole directories with ScpClient using the Upload(DirectoryInfo directoryInfo, string Path) function (ScpClient.NET.cs)
My example uploads c:\temp\configuration to /home/root
I was expecting to get the content of my local folder in /home/root/configuration
but it ended up in /home/root/root
What I think is the faulty line is
SendData(channel, string.Format("D0755 0 {0}\n", Path.GetFileName(path)));
I believe it should be:
SendData(channel, string.Format("D0755 0 {0}\n", directoryInfo.Name));
I was testing the uploading of whole directories with ScpClient using the Upload(DirectoryInfo directoryInfo, string Path) function (ScpClient.NET.cs)
My example uploads c:\temp\configuration to /home/root
I was expecting to get the content of my local folder in /home/root/configuration
but it ended up in /home/root/root
What I think is the faulty line is
SendData(channel, string.Format("D0755 0 {0}\n", Path.GetFileName(path)));
I believe it should be:
SendData(channel, string.Format("D0755 0 {0}\n", directoryInfo.Name));