This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: cygwin-1.7: mv appends .exe extension to .bat and .com files


On Oct  9 08:48, Ralph Hempel wrote:
> Corinna Vinschen wrote:
>> On Oct  2 11:01, Corinna Vinschen wrote:
>>> On Oct  1 09:27, Herb Maeder wrote:
>>>> With a fresh install of cygwin-1.7 on a vanilla Vista system, I see that
>>>> the 'mv' command appends a .exe extension to the destination file for 
>>>> any
>>>> source files that have a .bat or .com extensions.
>
> <SNIP>
>
>> That should be fixed now in CVS.
>
> Might this issue also affect the operation of "install" with
> cygwin-1.7 on a vanilla XP-SP3?
>
> <http://cygwin.com/ml/cygwin/2008-10/msg00110.html>
>
> Install seems to strip the .exe extension in the process of copying
> files to the destination directory.

Install *copies* files.  The resulting filename is not under control of
Cygwin but exclusively under control of the copying application.  This
is different from rename and link which are OS functions and thus
implemented in Cygwin.s

To add to the confusion, try `install -s' which will add the .exe
extension to the resulting file.  The reason is that install calls
strip on the copied file and strip calls rename at one point, which in
turn adds the .exe extension.

Actually it would be possible to change the filename at copy time by
keeping track if a write to a file is the first write and if the bytes
to write are equivalent to a PE/COFF header.  If so, Cygwin could
rename foo to foo.exe without bothering the application.  That's what
U/WIN does.  I'm not yet sure if that's something we want to do, too.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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