mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
hurd: Make symlink return EEXIST on existing target directory
8ef1791950 ("hurd: Fix EINVAL error on linking to a slash-trailing path
[BZ #32569]) made symlink return ENOTDIR, but the gnulib testsuite does
not recognize it for such a situation, and EEXIST is indeed more
comprehensible to users.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user