- for (j = 0; fbuf[j]; j++) {
- if (fbuf[j] != fname[j]) {
- while (fa_lvl) {
- if (fbuf[j] == '/')
- pop_local_filters(filt_array[--fa_lvl]);
- if (!fbuf[++j])
- break;
- }
- break;
- }
- }
-
- dlen = strlcpy(fbuf, fname, MAXPATHLEN);
- if (dlen >= MAXPATHLEN - 1)
- return;
- if (fa_lvl >= MAXPATHLEN/2)
- return; /* impossible... */
+ while (cur_depth >= new_depth && cur_depth >= min_depth)
+ pop_local_filters(filt_array[cur_depth--]);
+ cur_depth = new_depth;
+ if (min_depth > cur_depth)
+ min_depth = cur_depth;
+ filt_array[cur_depth] = push_local_filters(fbuf, dlen);