If an extension is updated and the extension in the file
system is a symlink to a different directory, all
target directory contents is removed and the update fails.
Introduce a check for symlink and just remove the
symlink in this case.
Resolves: #46158
Releases: 6.1, 6.0
Change-Id: I112ae7192fb0edf77ebd703a61804dc09ca506a4
Reviewed-on: https://review.typo3.org/18842
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn