From 63feb84a2db5246fb71df45884589b914679110c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 19 Mar 2008 13:37:04 +0100 Subject: mv: never unlink a destination file before calling rename While cp --preserve=links must unlink certain destination files, mv must never do that. * src/copy.c (copy_internal): Pull the '! x->move_mode' test "up", so it affects the entire condition, and not just DEREF_NEVER mode. Reported by James Ralston in . * tests/mv/atomic2: New file. Test for the above fix. * tests/mv/Makefile.am (TESTS): Add atomic2. * NEWS: Mention the bug-fix. [Bug introduced in 367719ba5f1dbd5e2f7fa2466c441f23f66a7c9e] --- tests/mv/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/mv/Makefile.am') diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am index c1219113e..92ec68e39 100644 --- a/tests/mv/Makefile.am +++ b/tests/mv/Makefile.am @@ -1,7 +1,6 @@ # Make coreutils tests for "mv". -*-Makefile-*- -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 -# Free Software Foundation, Inc. +# Copyright (C) 1998-2008 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +16,7 @@ # along with this program. If not, see . TESTS = \ + atomic2 \ sticky-to-xpart \ hard-verbose \ backup-dir \ -- cgit v1.2.3-54-g00ecf