X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 9 Oct 2008 15:05:40 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cygwin-1.7: mv appends .exe extension to .bat and .com files Message-ID: <20081009130540.GA9289@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <0MKr6C-1Kl4Ya1pOX-000Qp8 AT mx DOT kundenserver DOT de> <20081002090144 DOT GA23019 AT calimero DOT vinschen DOT de> <20081009100432 DOT GR9289 AT calimero DOT vinschen DOT de> <48EDFDAD DOT 9020407 AT bmts DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48EDFDAD.9020407@bmts.com> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. > > > >> 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? > > > > 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/