]> granicus.if.org Git - apache/commitdiff
Reduce magic levels.
authorBen Laurie <ben@apache.org>
Sun, 9 Dec 2001 17:48:52 +0000 (17:48 +0000)
committerBen Laurie <ben@apache.org>
Sun, 9 Dec 2001 17:48:52 +0000 (17:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92401 13f79535-47bb-0310-9956-ffa450edef68

server/request.c

index 75c1e6fb06e1a25f21717c0b9815c2e2fd23246c..fe9ae3a845694f8e4279138477906e727852ab86 100644 (file)
@@ -618,12 +618,14 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
             int res;
             char *seg_name;
             char *delim;
+           int temp_slash=0;
         
             /* We have no trailing slash, but we sure would appreciate one...
              */
             if (sec_idx && r->filename[filename_len-1] != '/') {
                 r->filename[filename_len++] = '/';
                 r->filename[filename_len] = 0;
+               temp_slash=1;
             }
 
             /* Begin *this* level by looking for matching <Directory> sections
@@ -791,7 +793,7 @@ minimerge2:
 
             /* That temporary trailing slash was useful, now drop it.
              */
-            if (seg > startseg) {
+            if (temp_slash) {
                 r->filename[--filename_len] = '\0';
             }