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]

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


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      

cygcheck.out

--
Want to unsubscribe from this list?
Check out: 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]