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  1 21:02, Thorsten Kampe wrote:

> * Herb Maeder (Wed, 01 Oct 2008 09:27:25 -0700)
> > 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.
> > 
> > To reproduce:
> >     
> >    % mkdir foobar
> >    % touch foo.bat
> >    % mv foo.bat foobar
> >    % ls foobar
> >    foo.bat.exe
> >    
> > Same goes for .com files.  And if a directory is moved any .bat or .com
> > files will be renamed to .bat.exe and .com.exe in the destination
> > directory.  I see this with at least the cygwin-1.7.0-29 and and
> > cygwin-1.7.0-30 dlls.
> > 
> > A cygwin-1.5 install on Vista does not add the .exe extension.
> > 
> > I believe that this should be easily reproducible.  But if not, I can
> > provide more details.
> 
> I can confirm that but I'm not so sure it is mv itself. I've seen these 
> kind of files on my iPod (where I rsync to from my USB drive) so I think 
> it might be the cygwin1.dll itself...

That was my guess too, but running the 1.5 version of 'mv' with from
a 1.7 shell did not show the same problem.  But it is not specific to 'mv'
either since this also shows the problem:

    main() { rename("foo.bat", "bar.bat"); } 

I did, however, notice a difference regarding the .exe extension in
running strace on the 1.5 and 1.7 version of 'mv' right before the
rename() system call.

Anyway, Corinna was able to reproduce and will dig into it soon enough.

One nice that that I noticed with the strace comparison was that the time
it took to get to the rename system call was significantly shorter with
the 1.7 'mv' command (20ms for 1.7 vs 120ms for 1.5).  Sweet!

Herb.

--
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]