TDirectorySync.SyncOneWay and CheckOneWay recurse into every entry with faDirectory, so they also follow directory junctions and symbolic links. SyncOneWay then copies the link's target into the destination as an ordinary directory, and a link that points back up the source tree (mklink /J loop ..) makes it copy the tree into itself level by level until the path gets too long. SyncBothWays does this in both directions.
From reading the code, not measured. The same recursion in TSimpleDirEnumerator.Execute was measured in [bugs:#99]: a junction to its own parent returned every file 32 times.
Junctions and symlinks (reparse tags IO_REPARSE_TAG_MOUNT_POINT and IO_REPARSE_TAG_SYMLINK) should not be followed. Other reparse points such as OneDrive folders are ordinary directories.
Bug Reports: #101
Bug Reports: #120
Bug Reports: #121
Bug Reports: #99
Fixed in revision [r2546].
Related
Commit: [r2546]
Follow-up in revision [r2557]: the fix in r2546 expanded the directory names again on every recursion step. A subdirectory whose name ends in a blank or dot was skipped, and FlattenDirHierarchy into a drive root (e.g.
d:\) wrote to that drive's current directory instead. The names are now expanded only once.Related
Commit: [r2557]