Hi,
We use you ComponentPro.Net.Scp control to download directories/files. We would like to ignore some type of files.
But when I use the 'Skip' flag in ComponentPro.IO.FileSystemProgressEventArgs to step over an specific download, I get an System.InvalidOperationException.
What is the right way to achive our goal with the scp control?
Thanks, Bodo
Code to reproduce this issue:
public void SkipTest()
{
using(Scp Client = new Scp())
{
Client.Progress = Client_Progress;
Client.Connect("Server");
Client.Authenticate(...);
Client.Download("DatDir/SubDir", @"d:\tmp"); //fires System.InvalidOperationException
Client.Disconnect();
}
}
private void Client_Progress(object sender, ComponentPro.IO.FileSystemProgressEventArgs e)
{
if(e.State == TransferState.StartDownloadingFile)
{
if(e.SourcePath.EndsWith(".tmp"))
e.Skip = true;
}
}
asked 3/29/2021 2:51:29 PM