Hi,

I got a problem in cp operation. When I copy a FILE to a device with
less space than the FILE size, I get the following behavior:

[EMAIL PROTECTED] root]# ls -l teste.zero
-rw-r--r--    1 root     root     172933632 Set 18 23:06 teste.zero
[EMAIL PROTECTED] root]# cp teste.zero ./teste.zero2
cp: writing `./teste.zero2': No space left on device
[EMAIL PROTECTED] root]# ls -l teste.zero*
-rw-r--r--    1 root     root     172933632 Set 18 23:06 teste.zero
-rw-r--r--    1 root     root     138993664 Set 18 23:08 teste.zero2

The cp doesn't remove the incomplete target file in this situation. So,
looking for a solution, I identified the point where need changes:

if (full_write (dest_desc, buf, n_read) < 0)
    {
              error (0, errno, _("writing %s"), quote (dst_path));
              return_val = -1;
              goto close_src_and_dst_desc;
    }   
        
I would like to get a feedback from you if the behavior described above
is a BUG. In case positive, I'd like to propose a patch.
  
I'm using fileutils-4.1 on Red Hat 9. Looking in a Conectiva 8 I got the
same with the same fileutils software installed.


Regards,

RMJ.






_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to