From: GNU Libc Maintainers Date: Wed, 18 Jun 2025 04:49:31 +0000 (+0200) Subject: git-symlink-eexist X-Git-Tag: archive/raspbian/2.41-9+rpi1^2~49 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=40659fa099a64a7f74cd3add07bba3101fcc7104;p=glibc.git git-symlink-eexist commit 1eb32c5788a59b821087f971821536a22a3b65de Author: Samuel Thibault Date: Mon Apr 21 22:21:17 2025 +0200 hurd: Make symlink return EEXIST on existing target directory The gnulib testsuite does not recognize ENOTDIR for such a situation, and this error is indeed more comprehensible to users. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-symlink-eexist.diff --- diff --git a/sysdeps/mach/hurd/symlinkat.c b/sysdeps/mach/hurd/symlinkat.c index e7dfb673d..cb6250e6f 100644 --- a/sysdeps/mach/hurd/symlinkat.c +++ b/sysdeps/mach/hurd/symlinkat.c @@ -47,7 +47,7 @@ __symlinkat (const char *from, int fd, const char *to) if (! *name) /* Can't link to the existing directory itself. */ - err = ENOTDIR; + err = EEXIST; else /* Create a new, unlinked node in the target directory. */ err = __dir_mkfile (dir, O_WRITE, 0777 & ~_hurd_umask, &node);