summaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-30 15:15:02 +0000
committerJim Meyering <jim@meyering.net>1999-04-30 15:15:02 +0000
commit40d99818ef11661332de8319479046b45f2da5b6 (patch)
treed232cc08b3c6405d9ba035f5dc3adf228318f9b8 /src/copy.c
parent0d6a1583c61d66a931cc68427b89798a549eba5f (diff)
downloadcoreutils-40d99818ef11661332de8319479046b45f2da5b6.tar.xz
(copy_internal): Don't make `mv foo symlink-to-foo' fail.
That is, even though source and destination are `the same,' don't fail if the destination is a symlink. From Peter Samuelson.
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/copy.c b/src/copy.c
index c8a3d92ca..726ed8bd3 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -428,9 +428,8 @@ copy_internal (const char *src_path, const char *dst_path,
&& ! x->force
/* Allow them to be the same (and don't set `same') if
- we're in move mode and they're both symlinks. */
+ we're in move mode and the target is a symlink. */
&& !(move_mode
- && S_ISLNK (src_sb.st_mode)
&& S_ISLNK (dst_sb.st_mode))
/* If we're making a backup, we'll detect the problem case in