]> granicus.if.org Git - apache/commitdiff
Fix this optimization. We will skip along so long as we aren't at the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 22 Apr 2002 17:33:28 +0000 (17:33 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 22 Apr 2002 17:33:28 +0000 (17:33 +0000)
  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

server/request.c

index b871877ae5089c2c1d5ce4f4a0d63ea5ce079d59..f00d044c04d92ad33dc11ae4fc69178a67ac0c8d 100644 (file)
@@ -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;
                 }