lstat() and implied .exe extension

Fifer, Eric
Thu Apr 13 05:32:00 GMT 2000


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.


More information about the Cygwin-developers mailing list