Mail Archives: cygwin/2005/07/09/08:08:32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Christopher Faylor on 7/8/2005 11:02 PM:
> I don't get it. Certainly /cygdrive/c.exe doesn't exist so why would you
> try to link to it?
The algorithm I used was this:
1 - If source exists [determined by the return value of readlink
("source"), although just now I realized that for symbolic links, it
should really be the return value of readlink (concat (dirname ("dest"),
"source")) since symbolic links are relative to the destination, not the pwd]
2a - if source is non-symlink and exists with a trailing . [determined by
access ("source.")] use "source", else use "source.exe", because one of
those two spellings must have made test 1 succeed
2b - if source is symlink and exists with a trailing .lnk [determined by
readlink ("source.lnk")] use "source", else use "source.exe", because one
of those two spellings must have made test 1 succeed
I think the cleanup needs to be along these lines - in steps 2a and 2b, do
a sanity check of also checking whether "source.exe" exists. If neither
"source." nor "source.exe" exist, we must be on a virtual/managed drive
where the trailing . trick doesn't work, so fall back to "source".
"source.exe" should only be chosen when we can prove that "source" doesn't
exist but "source.exe" does.
- --
Life is short - so eat dessert first!
Eric Blake ebb9 AT byu DOT 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
iD8DBQFCz74n84KuGfSFAYARAkVxAJ9D9nuhSYh7Upg84Ww4n5fIKoGU2ACfX87f
QoAcrnJ3i1eOUPMberwA1LY=
=vC1h
-----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/
- Raw text -