This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Copying of symbolic links not working as expected
- From: "Matt D." <codespunk at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 21 Apr 2019 06:07:32 -0400
- Subject: Copying of symbolic links not working as expected
- Reply-to: codespunk+cygwin at gmail dot com
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