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: Unwanted .exe appended to symlinks


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to fergus on 7/8/2005 9:43 PM:
> 	ln -s /cygdrive/c /c
> Following the recent upgrade to cygutils I find that the symlink is
> created as /c.exe not /c and /f.exe not /f in cases where the drive
> exists.

As a temporary workaround until my patched coreutils-5.3.0-8 is uploaded,
you can create a relative symlink from a directory where the source name
doesn't resolve:

$ cd /tmp
$ ln cygdrive/c /c
$ ls -lF /c
lrwxrwxrwx  1 eblake None 10 Jul  9 07:20 /c -> cygdrive/c/

In the upcoming 5.3.0-8 release, in addition to fixing your reported bug
so that you don't need this temporary workaround, I'm also fixing symbolic
link creation to realize that naming a relative source file should check
the file's existence relative to "dirname dest", not to "pwd" (this is
different from hard links, mv, and cp, which all resolve the relative
source to pwd).  Technically, symlink creation should not need to check
the source's existence (after all, that's why creating dangling symlinks
is possible), but cygwin has to do it to make .exe magic more consistent.

Hmm, while I'm at it, "dirname //" should return //, not /.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCz9GQ84KuGfSFAYARAo3BAJ4kNNa92lDpN0AfatZ8sfmrwddPrACdFHIW
AIbIAUnF/lTWCLaxkcNcm38=
=eMqa
-----END PGP SIGNATURE-----

--
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]