This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Ls POSIX style slink output
Eric Blake wrote:
> Symlinks merely contain whatever text they were created with. If the text
> it was created with was Windows style, then readlink(2) will not translate
> it. I suppose I could try to patch ln(1) to posix-ify any name that looks
> like a Windows filename before actually calling symlink(2), but I'm not
> sure it buys much. So for now, it's a feature, not a bug.
Yes, those symlinks in /etc are explicitly created with Win32 paths by
the base-files postinstall script. I think the reasoning here is that
if a POSIX path were used for the target of the symlink then it would
have to be updated if the user ever changed the name of the /cygdrive
prefix, whereas just using a Win32 path is always correct and insulates
from that variable.
Moreover, I think recent versions of the Cygwin DLL (i.e. 1.7/HEAD) do
in fact normalize the target to be in POSIX form when reading the
contents of the symlink file. I seem to recall a headsup from Corinna
about this a while ago. This means no special accomodations are needed
in 'ls'.
Brian
--
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/