1.1.8 'cp' command wipes out the source file (win2000)

Alex Chen achen@lanterncom.com
Sat Mar 24 13:24:00 GMT 2001


I downloaded the latest 'Cygwin' (I believe it is 1.1.8)
package and discovered a very serious problem with the
'cp' command.

I am using Windows 2000. When I try
to copy a file from directory A to directory B
under Win2000 command prompt window (Not under 
bash shell) with the 'cp' command:
C:\A\subA>cd \B\subB
C:\B\subB>cp \A\subA\Foo.java .
cp: preserving permissions for ./\A\subA\Foo.java: No such file
 or directory

When I check the file Foo.java in \A\subA, its size has been
changed to '0' and the file is essentially wiped out.
Fortunately I have made a backup copy so  I put back the backup
copy and set its attribute to 'read only' and do the operation
again.  This time I get a different error message:
cp: cannot create regular file `./\A\subA\Foo.java': Permission
 denied

If I change the destination from '.' to a file name Foo.java, or if
I run the command under 'bash', then it seems to work

I can accept the command failing if I use the wrong syntax.  But
it is disastrous to have the source file wiped out.
_______________________________________
Alex Chen      

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: text/x-algol68
Size: 7767 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20010324/44642dda/attachment.bin>


More information about the Cygwin mailing list