Open daltonbohning opened 4 years ago
It doesn't seem there is a system call to update a link target. It seems the only way to update the target is to delete the destination before creating the symlink.
That's what cp
seems to do:
strace cp --no-dereference some_link existing_link
...
stat("existing_link"...
lstat("some_link"...
lstat("existing_link"...
unlink("existing_link"...
...
symlink(... "existing_link"...
Hello,
Just updating the issue to say that I've been hit by this behavior. It would be nice to have it corrected of course ;)
In the meantime as a workaround, I'm using dfind --type l
followed by drm
before running dsync
again.
Example: If we have these links:
And run dsync like this:
Then we get:
But
dst -> file2 would be expected
. Similarly, this happens when copying directories that contain links. This happens with bothdcp
anddsync
.