Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4k views
in .NET FTP by (1.8k points)
We are currently encountering a problem with the synchronize method syncing files that are already on the server.
The files are identical in name and size, but are different in time stamp.

Because we decided that date/time isn't essential in our use-case we would use these FTPSyncRules

FTPSyncRules syncRules = new FTPSyncRules
  {
      FileNameFilter = filter,
      DeleteIfSourceAbsent = true,
      FilterOnServer = true,
      IgnoreDate = true
  };


Where the last property would ensure the date isn't taken into account.
Nevertheless it doesn't seem to change the fact it is syncing already synced files.

What else then the name, filesize and date/time stamp could be the issue?
Is there a way to trace the decision process of the sync method?

3 Answers

0 votes
by (162k points)
I'm not sure what version you have, but in 7.0, the code looks like this:

if (syncRules.IgnoreDate)  // size same and ignoring dates
{
    log.Debug("Skipping since target has same size and ignoring dates: {0}", pair.RelativePath);
    return FTPSyncFileAction.None;
}


So by enabling logging at the Debug level or higher (All is the highest level) you should see this message.

Keep in mind that if you are transferring in ASCII mode the sizes may not be the same.
0 votes
by (1.8k points)
Could you please remind me (been a while since I did any development with the library) where or how I can set the logging level of the edt library?

And could you also explain what you mean with that last line regarding ASCII mode?
0 votes
by (162k points)
http://www.enterprisedt.com/products/ed ... gging.html

In ASCII mode transfers, source platform line terminators (e.g. CRLF) are translated into the appropriate line terminators on the target platform.

If the platforms are different, the line terminators may be different, and the files may differ in size.

Categories

...