This is the mail archive of the 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]

Copying an executable from network drive without .exe extension fails.

Friends,  <-- Now there's the start of a spam mail if ever I saw one ;)

I've searched archives and found a couple of potentially related messages,
but none I've found seem to quite match the behaviour I'm seeing.  This
appears to be new behaviour in ?1.5.x? that worked as I expected it to when
still on a 1.3.x version (sorry, can't remember which it was, and don't have
that machine in work today to check).

I have a script which is going through a list of file names and testing they
exist before copying them.  If the file doesn't exist, the script appends
..exe onto the end of the name and tests again (not sure if this is needed
for cygwin, but certainly is for MKS Toolkit).

echo "program" >> ../bins.lst


cat ../bins.lst | while read file
        if [ -f $P_WINDOWS/$file ]
                cp $P_WINDOWS/$file WIN/
                if  [ -f $P_WINDOWS/$file.exe ]
                        cp $P_WINDOWS/$file.exe WIN/
                        echo "H:$P_WINDOWS/$file doesn't exist" >> WIN.res

I am actually running the script while I've cd'd onto a network share, so
both source and destination drives are on the network, but two separate
machines.  At the time the above script is executed, the destination
directory does exist and is empty.  The source directory does exist and does
contain an .exe version of the 'program'.  The error produced is as

cp: `//dev2k/d/dev/product/bin/program' and `WIN/program' are the same file

To get around the problem, I've checked for the .exe version first and then
the non .exe version, but I thought it should be reported.

The potentially related messages I found are...
Re: cp -p fails with .exe files
ACL or file locking issue?
cp error -- oh the great sanity of *nix tools?! ...
RE: 1.3.5 cp/permissions bug


Steve Fairbairn.

This email has originated from Perwill plc (Registration No. 1906964) 
Office registered at: 13A Market Square, Alton, Hampshire, GU34 1UR, UK 
Tel: +44 (0)1420 545000 
Fax: +44 (0)1420 545001 
Privileged, confidential and/or copyright information may be contained 
in this email, and is only for the use of the intended addressee. 
To copy, forward, disclose or otherwise use it in any way if you are not 
the intended recipient or responsible for delivering to him/her is
If you receive this email by mistake, please advise the sender immediately, 
by using the reply facility in your email software.

We may monitor the content of emails sent and received via our network 
for the purposes of ensuring compliance with policies and procedures. 
This message is subject to and does not create or vary any contractual 
relationships between Perwill plc and the recipient. 
Any opinions expressed in the email are those of the sender and not 
necessarily of Perwill plc.
This email has been scanned for known viruses using 
McAfee WebShield 4.5 MR1a 


Attachment: cygcheck.out
Description: Binary data

Unsubscribe info:
Problem reports:

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