projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5775f7e
)
(same_file_ok): When moving a symlink onto itself,
author
Jim Meyering
<jim@meyering.net>
Sat, 13 Jan 2001 15:48:32 +0000
(15:48 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sat, 13 Jan 2001 15:48:32 +0000
(15:48 +0000)
don't remove the symlink. Reported by David Luyer as Debian bug#82089,
via Michael Stone.
src/copy.c
patch
|
blob
|
history
diff --git
a/src/copy.c
b/src/copy.c
index
f07a9ea
..
b5e0989
100644
(file)
--- 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;