logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: dc744b365248dbc1b8db4f81ee0d4ce321d28e44
parent cafb90f3ff97838f1174cc66a90809055ef1a564
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 22 Sep 2025 05:03:32 +0200

cmd/ln: put AT_FDCWD instead of errorneous value from opening destination

Diffstat:

Mcmd/ln.c2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/cmd/ln.c b/cmd/ln.c @@ -81,6 +81,8 @@ do_link(char *src, char *dest, int destfd) strerror(errno)); return -1; } + + destfd = AT_FDCWD; } else if(fstat(destfd, &dest_stat) < 0) {