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 Mon, Aug 8, 2016 at 9:52 AM, Erik Soderquist wrote:
> On Sun, Aug 7, 2016 at 4:11 AM, Herbert Stocker wrote:
>>>
>>> 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.
>
> Were you testing for the existence of a *directory* (
> /dir/subdir/something/. ) or for anything named *something* in
> /dir/subdir/ ?
>
> And what call were you using? It was my understanding that the foo ==
> foo.exe == foo.lnk == foo.exe.lnk was only applied when attempting to
> execute something... (is my understanding wrong?)
I'm wrong, the following test case demontrates that clearly.
$ rm -f /tmp/foo*
$ if [ -e /tmp/foo ] ; then echo yes ; else echo no ; fi
no
$ touch /tmp/foo.exe
$ if [ -e /tmp/foo ] ; then echo yes ; else echo no ; fi
yes
$
-- Erik
--
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