mirror of https://github.com/mirror/busybox.git
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 removed1_00_stable_10817
parent
74c66ad06e
commit
110fc0cacc
|
@ -96,7 +96,7 @@ extern int ln_main(int argc, char **argv)
|
||||||
|
|
||||||
linkIntoDirFlag = isDirectory(linkName, TRUE, NULL);
|
linkIntoDirFlag = isDirectory(linkName, TRUE, NULL);
|
||||||
|
|
||||||
if ((argc > 3) && !linkIntoDirFlag) {
|
if ((argc >= 3) && linkIntoDirFlag == FALSE) {
|
||||||
fprintf(stderr, not_a_directory, "ln", linkName);
|
fprintf(stderr, not_a_directory, "ln", linkName);
|
||||||
exit FALSE;
|
exit FALSE;
|
||||||
}
|
}
|
||||||
|
|
2
ln.c
2
ln.c
|
@ -96,7 +96,7 @@ extern int ln_main(int argc, char **argv)
|
||||||
|
|
||||||
linkIntoDirFlag = isDirectory(linkName, TRUE, NULL);
|
linkIntoDirFlag = isDirectory(linkName, TRUE, NULL);
|
||||||
|
|
||||||
if ((argc > 3) && !linkIntoDirFlag) {
|
if ((argc >= 3) && linkIntoDirFlag == FALSE) {
|
||||||
fprintf(stderr, not_a_directory, "ln", linkName);
|
fprintf(stderr, not_a_directory, "ln", linkName);
|
||||||
exit FALSE;
|
exit FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue