From: William A. Rowe Jr Date: Mon, 22 Apr 2002 17:33:28 +0000 (+0000) Subject: Fix this optimization. We will skip along so long as we aren't at the X-Git-Tag: 2.0.36~120 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab67ee44565487eb43b99b90f1b9ecebebce9f50;p=apache Fix this optimization. We will skip along so long as we aren't at the right number of components, -or- we mismatch on the current component. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94757 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/request.c b/server/request.c index b871877ae5..f00d044c04 100644 --- a/server/request.c +++ b/server/request.c @@ -764,11 +764,11 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) * Otherwise, skip over the mismatches. */ if (entry_core->d_components - && (entry_core->d_components < seg) - && (entry_core->d_is_fnmatch - ? (apr_fnmatch(entry_core->d, r->filename, - FNM_PATHNAME) != APR_SUCCESS) - : (strcmp(r->filename, entry_core->d) != 0))) { + && ((entry_core->d_components < seg) + || (entry_core->d_is_fnmatch + ? (apr_fnmatch(entry_core->d, r->filename, + FNM_PATHNAME) != APR_SUCCESS) + : (strcmp(r->filename, entry_core->d) != 0)))) { continue; }