This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN
On 8/8/2016 10:03 AM, Corinna Vinschen wrote:
> On Aug 8 09:43, cyg Simple wrote:
>> On 8/8/2016 7:23 AM, Corinna Vinschen wrote:
>>> On Aug 7 10:11, Herbert Stocker wrote:
>>>> On 05.08.2016 17:29, Corinna Vinschen wrote:
>>>> If you see the
>>>>> code required to handle .exe and .lnk extensions you don't *want*
>>>>> PATHEXT support anymore.
>>>>>
>>>>
>>>> Moreso, this code has recently broken my C++ code in Cygwin.
>>>> It tried to see if a directory /dir/subdir/something existed,
>>>> and Cygwin said yes because it found a /dir/subdir/something.exe .
>>>> So my program failed.
>>>
>>> I have some doubt here. Cygwin always checks for "foo" first.
>>> Only if it doesn't find "foo", it checks for "foo.exe", then
>>> for "foo.lnk" and last, for backward compat, for "foo.exe.lnk".
>>>
>>
>> Which is the exact cause of the issue.
>>
>>> In the POSIX realm, "foo" == "foo.exe" == "foo.lnk". The search itself
>>> is indiscriminately, because Cygwin can't know if you're looking for
>>> "foo" or "foo.exe" or a symlink "foo" using the .lnk suffix.
>>
>> Why do you say "In the POSIX realm"? Only Cygwin does this association.
>> I understand why it does so but is there a different way to achieve the
>> same thing with greater accuracy?
>
> No, sorry, but no. Every time you start to double guess what the
> application is looking for in a certain scenario, you lose. See
> the example I just made up in
>
> https://cygwin.com/ml/cygwin/2016-08/msg00124.html
>
> And it's just *one* very simple example.
>
Agree that looks horrific.
--
cyg Simple
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple