summaryrefslogtreecommitdiffstats
path: root/bin/mv
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-07-11 18:01:42 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-07-11 18:01:42 +0000
commit7339539ac5bf70b53a7f0e7db060f52e754be76a (patch)
treec313957a1b70b4134ab57327764aa1a78d210281 /bin/mv
parentc32f6e1e5d9861374b5a5503fa5bf9919368afcb (diff)
downloadFreeBSD-src-7339539ac5bf70b53a7f0e7db060f52e754be76a.zip
FreeBSD-src-7339539ac5bf70b53a7f0e7db060f52e754be76a.tar.gz
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
Diffstat (limited to 'bin/mv')
-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 5f0f28b..903ce7b 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);
}
OpenPOWER on IntegriCloud