Session.CompareDirectories issue with FileTransferProgressEventArgs.OverallProgress

Advertisement

geek569
Joined:
Posts:
14

Session.CompareDirectories issue with FileTransferProgressEventArgs.OverallProgress

FileTransferProgressEventArgs.FileProgress and FileTransferProgressEventArgs.OverallProgress are reported equals by Session.CompareDirectories() and ComparisonDifference.Resolve().

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,478
Location:
Prague, Czechia

Re: Session.CompareDirectories issue with FileTransferProgressEventArgs.OverallProgress

The Session.CompareDirectories should not even trigger the Session.FileTransferProgress event – as Session.CompareDirectories does not do any transfer.

The ComparisonDifference.Resolve typically transfers a single file only (unless the difference is a new folder). So indeed FileTransferProgressEventArgs.FileProgress and FileTransferProgressEventArgs.OverallProgress would be equal.

Reply with quote

martin
Site Admin
martin avatar

Sorry, but what you are you asking for? For an overall progress over multiple Resolve calls? You would have to calculate it on your own, based on ComparisonDifference.Local/Remote.Length.

Reply with quote

geek569
Joined:
Posts:
14

I mean how to get the right OverallProgress in FileTransferProgress when using ComparisonDifference.Resolve()
session.FileTransferProgress += (s, e) =>
{
   Log($"{e.FileName} | {e.CPS}/s | {e.FileProgress:P0} | {OverallProgress???}");
};

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum