This is the mail archive of the cygwin-developers@sourceware.cygnus.com 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]

RE: lstat() and implied .exe extension



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]