mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 01:41:01 -08:00
Fix an obscure bug in fstatat on Windows 9X.
src/w32.c (fstatat): Don't add an extra slash if the argument ends with a slash: this fails the subsequent call to stat_worker on Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
This commit is contained in:
parent
4f9700e529
commit
70db0db7bf
2 changed files with 10 additions and 1 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2014-03-10 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* w32.c (fstatat): Don't add an extra slash if the argument ends
|
||||
with a slash: this fails the subsequent call to stat_worker on
|
||||
Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
|
||||
|
||||
2014-03-10 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* w32term.c (w32_read_socket): In SIZE_RESTORED case
|
||||
|
|
|
|||
|
|
@ -5138,7 +5138,10 @@ fstatat (int fd, char const *name, struct stat *st, int flags)
|
|||
|
||||
if (fd != AT_FDCWD)
|
||||
{
|
||||
if (_snprintf (fullname, sizeof fullname, "%s/%s", dir_pathname, name)
|
||||
char lastc = dir_pathname[strlen (dir_pathname) - 1];
|
||||
|
||||
if (_snprintf (fullname, sizeof fullname, "%s%s%s",
|
||||
dir_pathname, IS_DIRECTORY_SEP (lastc) ? "" : "/", name)
|
||||
< 0)
|
||||
{
|
||||
errno = ENAMETOOLONG;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue