FreeBSD Bugzilla – Attachment 61491 Details for
Bug 92149
[patch] ln(1): ln -f -s does not remove existing directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.18 KB, created by
Eugene Grosbein
on 2006-01-22 13:50:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2006-01-22 13:50:02 UTC
Size:
1.18 KB
patch
obsolete
>--- ln.c.orig Sun Jan 22 20:05:44 2006 >+++ ln.c Sun Jan 22 20:28:10 2006 >@@ -198,8 +198,16 @@ > /* > * If the file exists, then unlink it forcibly if -f was specified > * and interactively if -i was specified. >+ * >+ * For the directory, remove it when dealing with symbolic link only. > */ > if (fflag && exists) { >+ if (sflag && rmdir(source)) { >+ if (errno != ENOTDIR) { >+ warn("%s", source); >+ return (1); >+ } >+ } > if (unlink(source)) { > warn("%s", source); > return (1); >@@ -216,6 +224,12 @@ > return (1); > } > >+ if (sflag && rmdir(source)) { >+ if (errno != ENOTDIR) { >+ warn("%s", source); >+ return (1); >+ } >+ } > if (unlink(source)) { > warn("%s", source); > return (1); >--- ln.1.orig Sun Jan 22 20:18:12 2006 >+++ ln.1 Sun Jan 22 20:36:06 2006 >@@ -69,8 +69,12 @@ > The options are as follows: > .Bl -tag -width flag > .It Fl f >-If the target file already exists, >-then unlink it so that the link may occur. >+If the target file or directory already exists, >+then remove it so that the link may occur. >+Note that no attempt to remove the directory is performed >+when running without the >+.Fl s >+option. > (The > .Fl f > option overrides any previous
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 92149
: 61491