This is the mail archive of the
mailing list for the Cygwin project.
Broken junctions and symlinks halt recursive cp and rsync operations?
- From: "Matt D." <codespunk at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 16 Nov 2017 06:55:38 -0500
- Subject: Broken junctions and symlinks halt recursive cp and rsync operations?
- Authentication-results: sourceware.org; auth=none
- Reply-to: codespunk+cygwin at gmail dot com
I can make a directory 'a/' and a symlink 'b' of 'b -> a' and copy 'b'
to 'c' which also points to 'a':
$CYGWIN= ln -s a b
$CYGWIN= cp -a b c
On Linux if I break the link as such:
$rm -r a c
I can still copy the broken link:
$cp -a b c
But on Cygwin I cannot do this for native junctions and native symbolic
links (note that Cygwin symlinks work fine in this scenario). This issue
breaks both cp and rsync when working with either form of native links.
$rm -r a b c
$CYGWIN=winsymlinks:nativestrict ln -s a b
$rm -r a
$CYGWIN=winsymlinks:nativestrict cp -a b c
cp: cannot create symbolic link 'c': No such file or directory
$rsync -a b c
rsync: symlink "/c/test/c" -> "a" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors)
(code 23) at main.c(1196) [sender=3.1.2]
Is there a way to recover from this? It breaks copy operations of
directories which contain broken symlinks where I would expect the
broken link to be copied as-is.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple