diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-04-27 11:31:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-04-27 11:31:41 +0000 |
commit | 35278cc7d7fe81e01bb092e76b775c169e7e85f6 (patch) | |
tree | 6ec42ab959998df5c0182183807ee2b9efc4cc91 /stdlib/canonicalize.c | |
parent | 536db0d3b5efac042be3bf1d6f99f9c418f76255 (diff) |
Updated to fedora-glibc-20050427T1043
Diffstat (limited to 'stdlib/canonicalize.c')
-rw-r--r-- | stdlib/canonicalize.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c index 2168bbd90e..9fc24b7d92 100644 --- a/stdlib/canonicalize.c +++ b/stdlib/canonicalize.c @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file. - Copyright (C) 1996-2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 1996-2002, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -199,6 +199,11 @@ __realpath (const char *name, char *resolved) if (dest > rpath + 1) while ((--dest)[-1] != '/'); } + else if (!S_ISDIR (st.st_mode) && *end != '\0') + { + __set_errno (ENOTDIR); + goto error; + } } } if (dest > rpath + 1 && dest[-1] == '/') |