+ 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 (need_first_push) {
+ if (dlen != 1 || fbuf[0] != '.') {
+ char *s = strrchr(fbuf, '/');
+ int first_dlen;
+ if (s)
+ first_dlen = s - fbuf;
+ else
+ first_dlen = 0;
+ if (!s || s[1] != '.' || s[2] != '\0') {
+ filt_array[fa_lvl++] = push_local_filters(fbuf,
+ first_dlen);
+ }
+ }
+ need_first_push = False;
+ }
+
+ if (dlen >= MAXPATHLEN - 1)
+ return;
+ if (fa_lvl >= MAXPATHLEN/2)
+ return; /* impossible... */
+