diff options
author | Jim Meyering <jim@meyering.net> | 2001-01-13 15:48:32 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-01-13 15:48:32 +0000 |
commit | b7138e1052fd632ad86c3be44dfb1557d9eaa860 (patch) | |
tree | 1a3597a4a054f1b95c6cbf140443779adbbc09d6 | |
parent | 5775f7e864bfbb1fc72f92f193e7ff635d1b8adb (diff) | |
download | coreutils-b7138e1052fd632ad86c3be44dfb1557d9eaa860.tar.xz |
(same_file_ok): When moving a symlink onto itself,
don't remove the symlink. Reported by David Luyer as Debian bug#82089,
via Michael Stone.
-rw-r--r-- | src/copy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c index f07a9ea0b..b5e09899c 100644 --- a/src/copy.c +++ b/src/copy.c @@ -424,7 +424,7 @@ same_file_ok (const char *src_path, const struct stat *src_sb, know this here IFF preserving symlinks (aka xstat == lstat), then it's ok. */ if (S_ISLNK (src_sb->st_mode) && S_ISLNK (dst_sb->st_mode)) - return 1; + return ! same_name (src_path, dst_path); src_sb_link = src_sb; dst_sb_link = dst_sb; |