bug-coreutils
[Top][All Lists]
Advanced

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

bug#56392: `cp --reflink=always` creates empty file on failure


From: Benjamin Gilbert
Subject: bug#56392: `cp --reflink=always` creates empty file on failure
Date: Tue, 5 Jul 2022 03:41:29 -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





reply via email to

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