Fix regression related to merge_directories with symlinked folders #5342
Changelog: Bugfix: Do not copy directories inside a symlinked one
In #5237 we fixed an issue, but also introduced a wrong behavior that was failing for some use cases (see new test: folders inside symlinked folders with more than one level of indirection). The folders inside the symlinked one were being copied (so the symlink folder was generated) and the final function creating the symlinked folder failed because the folder to create was already there (it has already been created due to the previous recursion).
Just for quick reference, this is the layout of the source folder for the new test (
The intention of test (
The text was updated successfully, but these errors were encountered:
On top of this branch I've added some tests here: #5353. I didn't want to merge them into this PR before talking about some use cases.
SCM introduces a new set of problems, as you have pointed in your previous comments. I think that we need to implement the same behavior for the consumer workflow (
Ideally we should have also the same behavior for SVN and GIT, but unfortunately, they behave differently related to linked folders: Git doesn't accept linked folders while SVN does. Is this a problem we want to handle?
About abs paths, totally agree, but let's do it for the linked files too (done
I'm also not sure if we want to fix all those tests for the
Please, @memsharded, review again and let me know about it, main points:
I find the implementation quite clear, with all the logic into the function
Some tests that fail in #5353 still fail: all of them are related to SCM scenarios with