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] |
On 01/04/2011 09:27 AM, David Mastronarde wrote: > > When there is a directory and an executable with the same name, mv adds > .exe when renaming the directory: > > % mkdir test2 > % cd test2 > % mkdir package-3.1.1 > % touch package-3.1.1.exe > % mv package-3.1.1 package-3.1.2 > % ls > package-3.1.1.exe package-3.1.2.exe/ > > There is also a problem when there is an executable matching the name > being moved to: > > % mv package-3.1.2.exe package-3.1.2 > % ls > package-3.1.1.exe package-3.1.2/ > % mv package-3.1.2 package-3.1.1 > mv: cannot move `package-3.1.2' to `package-3.1.1': Not a directory > > This happens with the latest snapshot of cygwin1.dll. You CAN'T have a directory and an executable sharing the same name on Linux, so why should you try the same thing on cygwin? Given that cygwin attempts to handle '.exe' as a necessary evil, and tries to recognize executables when the suffix is omitted, you are basically confusing cygwin by creating a directory and an executable with the same name. That said, there's probably room for improvement for recognizing the situation, and trying to be smarter when both directory and .exe executable exist; and the patch may need to be in coreutils rather than in cygwin1.dll (since cp is doing some extra legwork for .exe magic in the first place). Good thing I'm building coreutils 8.9 today :) -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |