logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: d99da98d804678e12b7bce2e21c56d03dad6a5e9
parent 5916e586589844d3cbb8f536080f4f91451756cb
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 28 Aug 2024 18:39:29 +0200

cmd/ln: Use symlinkat() instead of symlink()

Diffstat:

Mcmd/ln.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/ln.c b/cmd/ln.c @@ -31,7 +31,7 @@ do_link(char *src, char *dest) assert(errno == 0); if(opt_s) { - if(symlink(src, dest) == 0) return 0; + if(symlinkat(src, AT_FDCWD, dest) == 0) return 0; if(errno != EEXIST) {