public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Copying of symbolic links not working as expected
@ 2019-04-21 10:07 Matt D.
  2019-04-21 11:45 ` Matt D.
  0 siblings, 1 reply; 4+ messages in thread
From: Matt D. @ 2019-04-21 10:07 UTC (permalink / raw)
  To: cygwin

I'm experiencing a discrepancy between Linux cp and Cygwin cp when 
copying native symbolic links:

Test/
    FolderA/
       123/
       456/ -> 123/

On Linux I can:

 > cp -r FolderA/ FolderB/

 > ls -l FolderB/
total 0
drwxrwxr-x. 2 account group 45 Apr 21 05:47 123
lrwxrwxrwx. 1 account group  4 Apr 21 05:47 456 -> 123/

Entire folder copied with relative symblic link paths preserved.

*** (starting from the original state -- rm -rf FolderB/) ***

 > mkdir FolderB/
 > cp -r FolderA/456 FolderB/

 > ls -l FolderB/
total 0
lrwxrwxrwx. 1 account group  4 Apr 21 05:47 456 -> 123/

Note that "456 -> 123/" in "FolderB/" is a BROKEN link. This is 
DESIRABLE as it preserves my curated symbolic links with their relative 
paths.

On Cygwin:

 > cp -r FolderA/ FolderB/

... Works as expected

But:

 > cp -r FolderA/456 FolderB/

ERRORS:

cp: cannot create symbolic link 'FolderB/456': No such file or directory

I know that there is no file or directory there. I'm trying to copy one 
to this location.

--
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] 4+ messages in thread

end of thread, other threads:[~2019-04-21 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21 10:07 Copying of symbolic links not working as expected Matt D.
2019-04-21 11:45 ` Matt D.
2019-04-21 12:20   ` Eliot Moss
2019-04-21 12:39   ` LRN

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).