A program that recursively traverses a directory tree, needs to figure out what to do about symlinks (and/or junction points on Windows), to avoid going into an infinite loop when a symlink points to a parent directory. The two obvious options are:
Skip symlinks completely.
Go ahead and follow them, but keep track of all the directories visited, and skip whenever it's about to hit an infinite loop.
Which is the most common/expected/preferred choice?