This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Maybe 1.5 Regression: cp failing while working with cygwin 1.3.22


On Jan 15 13:21, Roland Schwingel wrote:
> Hi...
>
> Well... I am a late converter I know... But I am in the progress of doing 
> so.
> I am still running cygwin 1.3.22 and now setted up 1.5.25-7 but encountered 
> a problem
> with cp when working on a folder (hosted on a samba share on a linux box) 
> containing a symlink.
>
> My $CYGWIN is in both cases set to "binmode smbntsec" while it does not 
> make
> any difference when I put it to "binmode ntsec". My /etc/passwd is in both 
> cygwin
> installations correctly populated (AFAIK).
>
> Receipe to reproduce:
>
> 1. Login to your linux box in your homeaccount.
> 2. mkdir -p ~/tmp/test
> 3. cd ~/tmp/test
> 4. mkdir subdir
> 5. ln -s subdir symlink
> 6. logout
> 7. Start cygwin 1.3.22
> 8. cp -rp //server/share/path/to/your/home/tmp/test /tmp
> 9. <everything fine>
> 10. Start cygwin 1.5 installation
> 11. cp -rp //server/share/path/to/your/home/tmp/test /tmp
> 12. Error message appears:
>
> cp: will not create hard link: '/tmp/test/symlink' to directory 
> '/tmp/test/subdir'
>
> Obviously cygwin 1.5 is now detecting the symlink correctly while 1.3 was 
> not because it copied
> the symlinked folder as folder not as link (even when I did cp -a).
>
> Maybe this problem is not related to cygwin more to the cp program itself.
>
> Yet this causes a problem because in various locations I have some symlinks 
> on my servers...

Here's a question:  What do you actually expect?  The fact that
symlinks are symlinks is not transmitted from Samba to the Windows
client.  From the Windows client perspective the symlink is just
a directory.  So, in the 1.3 case you get two directories with
the same content after the cp.  In the 1.5 case you only copy the
original directory.  I think that the 1.5 behaviour is actually
better.  Consider a directory with many Gigs content and symlink
pointing to it.  Either way, the actual content will be copied.
Just in 1.3 it gets copied twice, while in 1.5 it will be copied
only once.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]