cygpath -w and .exe magic

Nellis, Kenneth Kenneth.Nellis@xerox.com
Fri Aug 26 15:34:00 GMT 2016


From: cyg Simple
> On 8/26/2016 10:35 AM, Nellis, Kenneth wrote:
> > From: Herbert Stocker
> >> On 26.08.2016 15:19, Lee Dilkie wrote:
> >>> and break everyone who has existing code to take care of this?
> >>
> >> If it is done, it should be done as an additional option, i'd say.
> >
> > Of course a new option, duh! ☺
> > But my feeble brain is failing to imagine a case where this
> > would break anything, unless the user solution would turn
> > a returned foo.exe into foo.exe.exe, which seems doubtful.
> >
> 
> We still don't have a valid case of failure without the .exe.  Until
> that happens this is a no-go change.

Here is a contrived example:

$ cmd /c DIR $(cygpath -w hello.exe)
 Volume in drive C has no label.
 Volume Serial Number is 6A15-FFB2

 Directory of C:\cygwin\home\knellis\dev\c\hello

08/26/2016  10:47            60,927 hello.exe
               1 File(s)         60,927 bytes
               0 Dir(s)  218,673,360,896 bytes free
$ cmd /c DIR $(cygpath -w hello)
 Volume in drive C has no label.
 Volume Serial Number is 6A15-FFB2

 Directory of C:\cygwin\home\knellis\dev\c\hello

File Not Found
$

As I originally said, "Food for thought."
I thought it might be worth a discussion.
Appreciate the comments.

--Ken Nellis


More information about the Cygwin mailing list