summaryrefslogtreecommitdiff
path: root/ln.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-08-06 11:48:34 -0400
committerJakob Kaivo <jkk@ung.org>2019-08-06 11:48:34 -0400
commit309293405cafadd2ba79e17d7e9555630e7ed21f (patch)
treee0374773d4e24c5ff701e5cdaa7458cf7510ac51 /ln.c
parent8dcd4de6ba99556d994487cf0c8d99e467ab6757 (diff)
get the right name if target of single link is a directory
Diffstat (limited to 'ln.c')
-rw-r--r--ln.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ln.c b/ln.c
index 3ff367b..4f30824 100644
--- a/ln.c
+++ b/ln.c
@@ -112,6 +112,8 @@ int main(int argc, char *argv[])
if (argc - optind == 2) {
if (dirfd == -1) {
dirfd = AT_FDCWD;
+ } else {
+ target = NULL;
}
return ln(argv[optind], dirfd, target, symbolic, force, flag);
}