Hi,I have the following environment:- Win7 / 64- .NET 3.5- MPC-Target :OpenSSH_6.0p1, OpenSSL 1.0.0j 10 May 2012- SSH.NET commit 19813I want to upload a directory structure (recursive, depth = 2) from the PC to a MPC basedLinux remote system. The total amount of data is about 8MB with 23 files from55 bytes to 4MB.Calling mScp.Upload(new DirectoryInfo(localDir), remoteDir) does not result anyerror and the Uploading event shoes uploading all files. But after Upload() returnedThere are a random number of missing files on the target (between 1 and 5).It tried the same with a PC based Linux as target what resulted in the same behaviour(OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011). It seems theproblem is caused anywhere within SSH.NET.Does anyone have a solution?Extension:I tried to workaround by replacing Upload(new DirectoryInfo(...)) by several singlecalls of Upload(new FileInfo(...)). This worked but is too slow for my application.
Comments: ** Comment from web user: TheCloudlessSky **
@Oleg,
1. This issue is still not fixed (even in the latest source). The issue is **not** the same as being able to upload a rooted directory. I have the exact same issue as the OP: I'm uploading a directory that has multiple files/nested directories and files *randomly do not get uploaded*:
using (var scp = new ScpClient("host", "user", "password"))
{
scp.Connect();
scp.Uploading += (s, e) =>
{
Console.WriteLine("UPLOAD -> " + e.Filename + ", Size=" + e.Size + ", Uploaded=" + e.Uploaded);
};
var directory = new DirectoryInfo(@"c:\toupload");
scp.Upload(directory, "xyz");
scp.Disconnect();
}
This *prints* the upload message for *every file* - but doesn't actually upload all of the files!