This is the mail archive of the
cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: lstat() and implied .exe extension
- To: 'Chris Faylor' <cgf at cygnus dot com>
- Subject: RE: lstat() and implied .exe extension
- From: "Fifer, Eric" <EFifer at sanwaint dot com>
- Date: Thu, 13 Apr 2000 13:30:40 +0100
- Cc: "'cygwin-developers at sourceware dot cygnus dot com'" <cygwin-developers at sourceware dot cygnus dot com>
Chris,
Your fix goes a little too far. Now lstat() doesn't seem
to respect SYMLINK_NOFOLLOW and behaves just like stat().
You may need to patch more than just path_conv::path_conv.
When I was playing with this yesterday I noticed that
the meaning of sym_buf passed to symlink_check_one is
overloaded, in the case of a regular file it just contains
the extension that you want to append, and in the case of a
symlink it contains the link (but you really just want
the extension). Then, when you imply a .exe onto a symlink,
you have to lie and say it's not a link otherwise ls will
try to do a readlink() that will fail.
I would have provided a patch, but I thought the whole
feature was dubious.
Eric