delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/10/00:57:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sun, 10 Jun 2001 00:57:49 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Problem with system commands: cp and mv
Message-ID: <20010610005749.D29397@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <04e701c0f076$66326600$c600a8c0 AT kssony> <200106091254 DOT PAA21647 AT linux.>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <200106091254.PAA21647@linux.>; from ehud@unix.simonwiesel.co.il on Sat, Jun 09, 2001 at 03:54:21PM +0300

On Sat, Jun 09, 2001 at 03:54:21PM +0300, Ehud Karni wrote:
>On Fri, 8 Jun 2001 16:54:01 -0700, Kerry Sanger <kerry AT bytedesigns DOT com> wrote:
>> 
>> I can't cp or mv any simple executable..example:
>> 
>>      simple C program - expire.c
>> 
>>      compile and link expire.c:
>>     
>>             gcc -c -I. expire.c
>>             gcc expire.o -o expire
>> 
>>      from the current directory where the expire
>>      executable exists and where a subdirectory util
>>      exists:                  cp expire util/
>>     -or-                      cp expire util/expire
>>     -or-                      mv expire util/
>>     -or-                      mv expire util/expire
>> 
>>      all return: 'expire and util/expire are the same file'..eh?
>>      there is no util/expire..so what's it seeing/comparing? 
>> 
>>      I can cp or mv any other flat file or library ( .a ) I've
>>      created to util..just not any of the executables.
>> 
>>      cygwin seems to think the current path and the
>>      current path/util are the same as though I were 
>>      attempting: cp expire ./expire
>>      ( in which case I would expect the error:
>>          expire and expire are the same file ).
>> 
>>      I can go to a dos window and:
>> 
>>        copy dcheck.exe util
>> -or- copy dcheck.exe util\
>> -or- copy dcheck.exe util\dcheck 
>
>I verified the problem on W98 too.
>It also occurs with hardlink (ln) but not with symbolic link (ln -s)
>presumably because `ln -s' does not check file existence.
>
>A very easy solution (workaround ?) is to use the file name with the
>.exe extension (checked\).

That's not only the easy solution, it is the correct one.  Also use UNIX
paths, not MS-DOS paths.  cp doesn't necessarily know that util\dcheck
refers to a directory.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019