On Mon, Mar 01, 2010 at 08:44:12AM -0500, Dan Poirier wrote:
> --- config.c (revision 916378)
> +++ config.c (working copy)
> @@ -1710,8 +1710,17 @@
> && strcmp(dirent.name, "..")
> && (apr_fnmatch(fname, dirent.name,
> APR_FNM_PERIOD) == APR_SUCCESS)) {
> + const char *full_path = ap_make_full_path(ptemp, path,
> dirent.name);
> + if (rest) {
> + /* If matching internal to path, and we happen to match
> something other than a directory, skip it */
> + apr_finfo_t finfo;
> + rv = apr_stat(&finfo, full_path, APR_FINFO_TYPE, ptemp);
> + if ((rv == APR_SUCCESS) && (finfo.filetype != APR_DIR)) {
You can get the type by checking dirent.filetype directly, if you add
APR_FINFO_TYPE to the bitmask passed to apr_dir_read(), this will be
more efficient on most platforms since it can avoid the stat call.
Regards, Joe