It also works with explicitly relative paths (at least on linux), i.e. they must be preceeded by ./. E.g. go test ./lib/model -run SomeTest works, while go test lib/model -run SomeTest does not.
A pull request created. We can bring the discussion about the code there.
I need your assistance there, as it seems to me that the failed tests are not related with my code changes.
Just to avoid any confusion: The functionality added by @xarx is not following symlinks, but treating directory junctions like directories and detecting path loops.
Thus my proposal: Make following junctions an advanced config option, disable it by default and discourage using it (like ignore delete thing, which doesn’t prevent people from using it, but at least allows us to give limited support for it). Any disagreements on this @calmh and @AudriusButkevicius?
Probably the few who depend on it hang on the forum and can be told of the new option, it might otherwise be a rude surprise when data behind junctions is deleted on other devices after upgrade.
I think I argued against an off switch previously, thinking one could be introduced later if it was required. I guess it is required. That should then switch off the recursion detection as well?
Maybe leave the setting as-is for existing configs, and only apply disabled-by-default to new configs? That would minimize the risk of breaking existing setups. That would of course mean that all current setups would have it on, but I guess most people affected have already worked around any issues (with ignores).
We have seen funny filesystems blow up with recursion errors too, so I guess it should be an off switch for both. There are also cases where even on normal filesystems we might trip over the recursion check, because for example ReFS uses 128 bits for identifying filesystem tree entries, yet OS apis only return the last 64bits…
Also, I am not sure if we want this to be an off switch, I think we want this to be an on switch instead?
Is it a setting? Because I can’t find one and it’s not working for me. I am a returning Syncthing user, I used it years ago and trying to see it will work for me to replace Resilio.
This has been cooking for a long time and each attempted implementation has run into unanticipated difficulties. Given that and the theoretical difficulties of ensuring correctness in the presence of (followed) symlinks I’ve decided that following symlinks will not be implemented. I’m also locking this issue because I don’t want followup arguing about in the bug tracker. Anyone is welcome to argue about it on the forum, but unless the argument is backed up by a foolproof implementation it’s unlikely to have a positive outcome. Sorry, peeps.
I just realized, that is your reply @calmh. Is this thread not the same thing?
There’s a new advanced folder setting “Junctions as dirs”. The feature and it’s issues are discussed (in part) in this thread. The feature treats Windows directory junctions like a “normal” directory.