Mail Archives: djgpp-workers/1999/01/24/03:47:12
``stat ("")'' succeeds and returns the info for ".". Here's the fix:
*** src/libc/posix/sys/stat/stat.c~0 Tue Aug 25 09:47:26 1998
--- src/libc/posix/sys/stat/stat.c Sat Jan 23 16:07:12 1999
*************** stat(const char *path, struct stat *stat
*** 862,869 ****
return -1;
}
! /* Fail if PATH includes wildcard characters supported by FindFirst. */
! if (memchr(path, '*', pathlen) || memchr(path, '?', pathlen))
{
errno = ENOENT; /* since no such filename is possible */
return -1;
--- 862,871 ----
return -1;
}
! /* Fail if PATH includes wildcard characters supported by FindFirst,
! or if it is empty. */
! if (memchr(path, '*', pathlen) || memchr(path, '?', pathlen)
! || path[0] == '\0')
{
errno = ENOENT; /* since no such filename is possible */
return -1;
- Raw text -