ExcludeDir handling in FTPSync 2.8b and earlier

One of the issues that confuse users of FTPSync the most (at least judging from the feedback) is how ExcludeDir parameter is handled. Many users are surprised when they see FTPSync retrieving a directory they specified as excluded. However, in older versions this is by design, since FTPSync does the processing in the following sequence:

  1. directory tree with all files and subdirectories is retrieved
  2. excluded files and directories are processed and removed from transfer list
  3. transfer is performed

In some cases this is a problem:

I’ve therefore started to re-organize the code, joining steps 1 and 2 (with plans to join step 3 later, too). Starting with FTPSync 2.8c FTPSync no longer retrieves excluded directories when building directory tree.