emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56391: closed (`cp --reflink=always` creates empty file on failure)


From: GNU bug Tracking System
Subject: bug#56391: closed (`cp --reflink=always` creates empty file on failure)
Date: Tue, 05 Jul 2022 15:05:02 +0000

Your message dated Tue, 5 Jul 2022 10:04:48 -0500
with message-id <8edadd5f-a640-09ce-340f-71ea17e5ea02@cs.ucla.edu>
and subject line Re: bug#56391: `cp --reflink=always` creates empty file on 
failure
has caused the debbugs.gnu.org bug report #56391,
regarding `cp --reflink=always` creates empty file on failure
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
56391: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56391
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: `cp --reflink=always` creates empty file on failure Date: Tue, 5 Jul 2022 01:39:11 -0400
Hi,

When `cp --reflink=always` fails because the filesystem does not support reflinks, I'd expect it not to leave anything at the destination path.  However, it appears to leave an empty file instead:

$ ls -l
total 0
$ echo "some data" > src
$ cp --reflink=always src dest
cp: failed to clone 'dest' from 'src': Operation not supported
$ ls -l
total 4
-rw-rw-r--. 1 bgilbert bgilbert  0 Jul  5 01:27 dest
-rw-rw-r--. 1 bgilbert bgilbert 10 Jul  5 01:27 src

I'm seeing this on both coreutils 9.0 (Fedora 36) and 9.1.31-fa332 built from Git.

Best,
--Benjamin Gilbert


--- End Message ---
--- Begin Message --- Subject: Re: bug#56391: `cp --reflink=always` creates empty file on failure Date: Tue, 5 Jul 2022 10:04:48 -0500 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1
Thanks for reporting that. I installed the attached patch.

Attachment: 0001-cp-don-t-create-empty-file-if-cannot-clone.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]