Session.CompareDirectories – No diffs found

Advertisement

Michael3
Joined:
Posts:
1

Session.CompareDirectories – No diffs found

Hi,
I'm using Session.CompareDirectories to get list of all diffs between local path and remote path.
The function return diffs only if the file not exists in remote. if the file changes (data or size) I can't see it in the diffs list.
if (session.FileExists(remotePath2))
{
    compareDiffs =
        session.CompareDirectories(
            SynchronizationMode.Remote, projectSyncPath + "/", remotePath2,
            true, false, SynchronizationCriteria.Either);
    count += compareDiffs.Count;
    if (compareDiffs.Count > 0)
        SaveDiffPath(componentDirectoryName, compareDiffs);
}
My path are correct.
Appreciate any help.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
37,591
Location:
Prague, Czechia

Re: Session.CompareDirectories – No diffs found

Please attach a full session log file showing the problem (using the latest version of WinSCP). Give us a name of a file that you believe should have been identified as different but was not.

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Btw, do not append a forward slash to a local path.

Reply with quote

Advertisement

You can post new topics in this forum