FreeBSD Bugzilla – Attachment 41097 Details for
Bug 64430
Bug in mv(1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 840 bytes, created by
Samuel Tardieu
on 2004-03-18 19:00:28 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Samuel Tardieu
Created:
2004-03-18 19:00:28 UTC
Size:
840 bytes
patch
obsolete
>--- mv-old/mv.c 2004-03-18 19:44:53.000000000 +0100 >+++ mv-new/mv.c 2004-03-18 19:44:53.000000000 +0100 >@@ -212,6 +212,30 @@ > struct statfs sfs; > char path[PATH_MAX]; > >+ /* If the source is a symbolic link and is on another >+ * filesystem, it can be recreated at the destination. >+ */ >+ if (lstat(from, &sb) == -1) { >+ warn("%s",from); >+ return (1); >+ } >+ if (S_ISLNK(sb.st_mode)) { >+ bzero(path, PATH_MAX); >+ if (readlink(from, path, PATH_MAX) == -1) { >+ warn("%s", from); >+ return (1); >+ } >+ if (symlink(path,to)==-1) { >+ warn("%s", to); >+ return (1); >+ } >+ if (unlink(from) == -1) { >+ warn("%s", from); >+ return (1); >+ } >+ return (0); >+ } >+ > /* Can't mv(1) a mount point. */ > if (realpath(from, path) == NULL) { > warnx("cannot resolve %s: %s", from, path);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 64430
: 41097