(copy_internal): Don't make `mv foo symlink-to-foo' fail.
authorJim Meyering <jim@meyering.net>
Fri, 30 Apr 1999 15:15:02 +0000 (15:15 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 30 Apr 1999 15:15:02 +0000 (15:15 +0000)
That is, even though source and destination are `the same,' don't fail
if the destination is a symlink.  From Peter Samuelson.

src/copy.c

index c8a3d92..726ed8b 100644 (file)
@@ -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