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: 'cp' utility bug when <dest-name>.exe file exist.


On Wed, Jun 9, 2010 at 13:38, Julio Costa wrote:
> And this is where my head got reeeally spinning... can anyone, please,
> explain the reason to why this .exe magic exists, anyway?

I can't answer that, but there is a style of symlinks that use .lnk
files. Cygwin displays them without that extension, but the actual
filename is .lnk so presumably Cygwin has to do some 'lnk-magic' to
deal with that. I know it's not the same thing as exe-magic, but it
might be related because Cygwin has to hide the "reality" from the
user in order for the symlink to work.

On Wed, Jun 9, 2010 at 04:21, Corinna Vinschen wrote:
> There is.  "foo" can mean "foo". or "foo.lnk", or "foo.exe".  Cygwin is
> handling all these names as being the same file.

With symlinks I can understand this, but why match to .exe? Is it
because Cygwin allows a user to execute a .exe file without specifying
the .exe extension? That is perhaps wrong too - if I want to run
foo.exe, I should type ./foo.exe, not ./foo - but ./foo currently
works.

Then, perhaps this logic was translated into 'cp' (but not 'mv' for
some reason?) because people wanted to copy such executables around in
the same manner: "cp foo bar" rather than "cp foo.exe bar.exe" - but
this seems like merely a 'convenience' for Windows users and not a
very good one at that.

Oh well, yet another thing I suppose to add to my list of ways Windows
has set information technology back decades :-P

-- David.

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


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