*** /usr/src/lib/libc/gen/glob.c Fri Feb 20 02:54:56 1998 --- /tmp/glob.c Sun May 21 01:19:24 2000 *************** *** 532,540 **** for (anymeta = 0;;) { if (*pattern == EOS) { /* End of pattern? */ *pathend = EOS; ! if (g_lstat(pathbuf, &sb, pglob)) ! return(0); ! if (((pglob->gl_flags & GLOB_MARK) && pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) || (S_ISLNK(sb.st_mode) && --- 532,543 ---- for (anymeta = 0;;) { if (*pattern == EOS) { /* End of pattern? */ *pathend = EOS; ! if (g_lstat(pathbuf, &sb, pglob)) { ! if (pglob->gl_flags & GLOB_ERR) ! return GLOB_ABEND; ! else ! return(0); ! } if (((pglob->gl_flags & GLOB_MARK) && pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) || (S_ISLNK(sb.st_mode) && *************** *** 589,599 **** errno = 0; if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { ! /* TODO: don't call for ENOENT or ENOTDIR? */ if (pglob->gl_errfunc) { g_Ctoc(pathbuf, buf); ! if (pglob->gl_errfunc(buf, errno) || ! pglob->gl_flags & GLOB_ERR) return (GLOB_ABEND); } return(0); --- 592,602 ---- errno = 0; if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { ! if ((pglob->gl_flags & GLOB_ERR) && (errno != ENOENT) && (errno != ENOTDIR)) ! return GLOB_ABEND; if (pglob->gl_errfunc) { g_Ctoc(pathbuf, buf); ! if (pglob->gl_errfunc(buf, errno)) return (GLOB_ABEND); } return(0);