This is the mail archive of the cygwin@cygwin.com 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

$P_WINDOWS='//dev2k/d/dev/product/bin'

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

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
follows...

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
	http://www.cygwin.com/ml/cygwin/2001-06/msg01210.html
ACL or file locking issue?
	http://www.cygwin.com/ml/cygwin/2003-07/msg00950.html
cp error -- oh the great sanity of *nix tools?! ...
	http://www.cygwin.com/ml/cygwin/2001-06/msg01364.html
RE: 1.3.5 cp/permissions bug
	http://www.cygwin.com/ml/cygwin/2001-11/msg01423.html

Cheers,

Steve Fairbairn.
-- 
-- LONG DISCLAIMER --

******************************************************* 
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 
www.perwill.com 
******************************************************* 
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
prohibited.
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:      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]