Date: Fri, 7 Apr 2000 12:30:03 -0700 (PDT) From: David Malone <dwmalone@maths.tcd.ie> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/17847: mv symbolic link cross partition fails Message-ID: <200004071930.MAA85995@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/17847; it has been noted by GNATS.
From: David Malone <dwmalone@maths.tcd.ie>
To: j_guojun@lbl.gov
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/17847: mv symbolic link cross partition fails
Date: Fri, 07 Apr 2000 20:28:07 +0100
> If every one agree this incorrect, I can trace down the code to
> find a patch.
This sounds like a bug, as it doesn't do the same thing as mving
a symlink on a local partition would. If the file the symlink points
to is a regular file you'll end up getting a copy of that instead
of the symlink.
Digital Unix and Linux also do the same "correct" thing as solaris.
It looks like mv has a stat, which should be an lstat. The included
patch seems to fix it.
BTW - for some strange reason your PR seems to be marked as
confidential on the web site.
David.
--- mv.c Fri Apr 7 20:19:19 2000
+++ mv.c.orig Fri Apr 7 20:19:45 2000
@@ -221,7 +221,7 @@
* it's a regular file, do the copy internally; otherwise, use
* cp and rm.
*/
- if (lstat(from, &sb)) {
+ if (stat(from, &sb)) {
warn("%s", from);
return (1);
}
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004071930.MAA85995>
