Hi
After upgrading to coreutils 9.2-2 on Arch Linux the following:
mkdir -p src dst
touch {src,dst}/bar
cp --recursive --backup src/* dst
fails with:
cp: cannot create regular file 'dst/foo/bar': File exists
Running strace on cp I noticed:
renameat2(4, "foo/bar", 4, "foo/bar~", 0) = -1 ENOENT (N
Hi
After upgrading to coreutils 9.2-2 on Arch Linux the following:
mkdir -p src dst
touch {src,dst}/bar
cp --recursive --backup src/* dst
fails with:
cp: cannot create regular file 'dst/foo/bar': File exists
Running strace on cp I noticed:
renameat2(4, "foo/bar", 4, "foo/bar~", 0) = -1 ENOENT (N
On 2023-04-01 08:44, Pádraig Brady wrote:
OK first stab at --update=none support is attached.
Thanks, some comments:
+ /* Always Overwrite. */
+ UPDATE_OVERWRITE,
Might be better to call this UPDATE_ALL as it doesn't overwrite if you
use cp -l or -s or (in some cases) --preserve=links
Maybe simpler:
-m --missing
Only copy non existing files.
On Sat, 1 Apr 2023 at 17:44, Pádraig Brady wrote:
> On 01/04/2023 00:29, Paul Eggert wrote:
> > On 2023-03-31 14:32, Pádraig Brady wrote:
> >
> >> Perhaps we should support:
> >> --no-clobber[={skip, fail (default)}]
> >>
> >> so the
On 01/04/2023 00:29, Paul Eggert wrote:
On 2023-03-31 14:32, Pádraig Brady wrote:
Perhaps we should support:
--no-clobber[={skip, fail (default)}]
so then users can at least easily change -n to --no-clobber=skip
to get the old behavior?
An alternative would be to augment the --update opti
On 01/04/2023 15:46, Alberto Salvia Novella wrote:
Also there's now a bigger problem: that you cannot tell when the copy
failed because the file exists, or because any other reason.
People will just use:
cp --no-clover $in $out || true
But if it fails for any other reason, cross your fingers.
Also there's now a bigger problem: that you cannot tell when the copy
failed because the file exists, or because any other reason.
People will just use:
cp --no-clover $in $out || true
But if it fails for any other reason, cross your fingers.
Hence now the option, in practice, is useless. Nobody