Skip to content

UploadDirectory in ScpClient.Net #81

@Psilax

Description

@Psilax

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));

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions