Check for 3 and more arguments was incorrect
It is only allowed for linking to a directory
But linking to a directory still fails and may be removed
diff --git a/coreutils/ln.c b/coreutils/ln.c
index 634c990..3714822 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -96,7 +96,7 @@
linkIntoDirFlag = isDirectory(linkName, TRUE, NULL);
- if ((argc > 3) && !linkIntoDirFlag) {
+ if ((argc >= 3) && linkIntoDirFlag == FALSE) {
fprintf(stderr, not_a_directory, "ln", linkName);
exit FALSE;
}
diff --git a/ln.c b/ln.c
index 634c990..3714822 100644
--- a/ln.c
+++ b/ln.c
@@ -96,7 +96,7 @@
linkIntoDirFlag = isDirectory(linkName, TRUE, NULL);
- if ((argc > 3) && !linkIntoDirFlag) {
+ if ((argc >= 3) && linkIntoDirFlag == FALSE) {
fprintf(stderr, not_a_directory, "ln", linkName);
exit FALSE;
}