From: Ulrich Drepper Date: Wed, 29 Dec 1999 03:03:12 +0000 (+0000) Subject: (glob): Pass alternate file access functions also in recursive call. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb050c4c892c55eda5743ea37cf0cbe0c325d1ce;p=thirdparty%2Fglibc.git (glob): Pass alternate file access functions also in recursive call. --- diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c index 9b134c5a0dd..9a57230e773 100644 --- a/sysdeps/generic/glob.c +++ b/sysdeps/generic/glob.c @@ -841,8 +841,20 @@ glob (pattern, flags, errfunc, pglob) glob_t dirs; register int i; + if ((flags & GLOB_ALTDIRFUNC) != 0) + { + /* Use the alternative access functions also in the recursive + call. */ + dirs.gl_opendir = pglob->gl_opendir; + dirs.gl_readdir = pglob->gl_readdir; + dirs.gl_closedir = pglob->gl_closedir; + dirs.gl_stat = pglob->gl_stat; + dirs.gl_lstat = pglob->gl_lstat; + } + status = glob (dirname, - ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE)) + ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE + | GLOB_ALTDIRFUNC)) | GLOB_NOSORT | GLOB_ONLYDIR), errfunc, &dirs); if (status != 0)