From: Jim Meyering Date: Fri, 30 Apr 1999 15:15:02 +0000 (+0000) Subject: (copy_internal): Don't make `mv foo symlink-to-foo' fail. X-Git-Tag: SH-UTILS-1_16h~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40d99818ef11661332de8319479046b45f2da5b6;p=thirdparty%2Fcoreutils.git (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. --- diff --git a/src/copy.c b/src/copy.c index c8a3d92cac..726ed8bd3b 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