aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2000-07-11 18:01:42 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2000-07-11 18:01:42 +0000
commita95d6fda80b53c3125df8e5ebfda72905141fd82 (patch)
treec5ac0928479f64ebf0e1fab8e871dc6bc74c5fc1
parent33d70f97bf8ba280983131e06e1a75adaf1bf72f (diff)
downloadsrc-a95d6fda80b53c3125df8e5ebfda72905141fd82.tar.gz
src-a95d6fda80b53c3125df8e5ebfda72905141fd82.zip
Use lstat(2) instead of stat(2) when deciding if we should fastcopy
a file. This fixes moving symlinks across partitions. PR: 17847 Reviewed by: bde
Notes
Notes: svn path=/head/; revision=62963
-rw-r--r--bin/mv/mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 5f0f28b1882d..903ce7ba4675 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -221,7 +221,7 @@ do_move(from, to)
* it's a regular file, do the copy internally; otherwise, use
* cp and rm.
*/
- if (stat(from, &sb)) {
+ if (lstat(from, &sb)) {
warn("%s", from);
return (1);
}