1383 |
|
|
1384 |
while ((nextfile = readdirectory(dir)) != NULL) |
while ((nextfile = readdirectory(dir)) != NULL) |
1385 |
{ |
{ |
1386 |
int frc, blen; |
int frc, nflen; |
1387 |
sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile); |
sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile); |
1388 |
blen = strlen(buffer); |
nflen = strlen(nextfile); |
1389 |
|
|
1390 |
if (exclude_compiled != NULL && |
if (!isdirectory(buffer)) |
1391 |
pcre_exec(exclude_compiled, NULL, buffer, blen, 0, 0, NULL, 0) >= 0) |
{ |
1392 |
continue; |
if (exclude_compiled != NULL && |
1393 |
|
pcre_exec(exclude_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0) |
1394 |
if (include_compiled != NULL && |
continue; |
1395 |
pcre_exec(include_compiled, NULL, buffer, blen, 0, 0, NULL, 0) < 0) |
|
1396 |
continue; |
if (include_compiled != NULL && |
1397 |
|
pcre_exec(include_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0) |
1398 |
|
continue; |
1399 |
|
} |
1400 |
|
|
1401 |
frc = grep_or_recurse(buffer, dir_recurse, FALSE); |
frc = grep_or_recurse(buffer, dir_recurse, FALSE); |
1402 |
if (frc > 1) rc = frc; |
if (frc > 1) rc = frc; |