[PATCH] ln: --no-target-directory implies --no-dereference

Kaarle Ritvanen kaarle.ritvanen at datakunkku.fi
Mon Oct 7 16:24:13 UTC 2019


as in GNU coreutils
---
 coreutils/ln.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/coreutils/ln.c b/coreutils/ln.c
index ea2d10eab..f2a1941b9 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -85,10 +85,7 @@ int ln_main(int argc, char **argv)
 		src_name = NULL;
 		src = last;
 
-		if (is_directory(src,
-		                (opts & LN_NODEREFERENCE) ^ LN_NODEREFERENCE
-		                )
-		) {
+		if (is_directory(src, !(opts & (LN_NODEREFERENCE|LN_LINKFILE)))) {
 			if (opts & LN_LINKFILE) {
 				bb_error_msg_and_die("'%s' is a directory", src);
 			}
-- 
2.20.1



More information about the busybox mailing list