Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166217380
D11167.id29871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11167.id29871.diff
View Options
Index: bin/ln/ln.c
===================================================================
--- bin/ln/ln.c
+++ bin/ln/ln.c
@@ -245,11 +245,11 @@
/*
* If the target is a directory (and not a symlink if hflag),
- * append the source's name.
+ * append the source's name, unless Fflag is set.
*/
- if (isdir ||
+ if (!Fflag && (isdir ||
(lstat(target, &sb) == 0 && S_ISDIR(sb.st_mode)) ||
- (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode))) {
+ (!hflag && stat(target, &sb) == 0 && S_ISDIR(sb.st_mode)))) {
if (strlcpy(bbuf, source, sizeof(bbuf)) >= sizeof(bbuf) ||
(p = basename(bbuf)) == NULL ||
snprintf(path, sizeof(path), "%s/%s", target, p) >=
Index: bin/ln/tests/ln_test.sh
===================================================================
--- bin/ln/tests/ln_test.sh
+++ bin/ln/tests/ln_test.sh
@@ -160,10 +160,10 @@
sF_flag_body()
{
- atf_expect_fail "B isn't being unlinked (bug 219943)"
atf_check mkdir A B
atf_check ln -sF A B
atf_check -o inline:'Symbolic Link\n' stat -f %SHT B
+ atf_check -o inline:'A\n' readlink B
}
atf_test_case sf_flag
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 13, 10:48 AM (11 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36625257
Default Alt Text
D11167.id29871.diff (1 KB)
Attached To
Mode
D11167: Fix behavior for '-F' option of ln(1)
Attached
Detach File
Event Timeline
Log In to Comment