* Broken junctions and symlinks halt recursive cp and rsync operations?
@ 2017-11-16 11:55 Matt D.
0 siblings, 0 replies; only message in thread
From: Matt D. @ 2017-11-16 11:55 UTC (permalink / raw)
To: cygwin
I can make a directory 'a/' and a symlink 'b' of 'b -> a' and copy 'b'
to 'c' which also points to 'a':
$mkdir 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
$mkdir a
$CYGWIN=winsymlinks:nativestrict ln -s a b
$rm -r a
See here:
$CYGWIN=winsymlinks:nativestrict cp -a b c
cp: cannot create symbolic link 'c': No such file or directory
And:
$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.
Matt D.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-16 11:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 11:55 Broken junctions and symlinks halt recursive cp and rsync operations? Matt D.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).