Repository navigation
Commit a7c7eec
committed
fix(filesystem): let a search_files read failure reach the caller
The recursive walk sat inside the try whose catch discarded the error,
so a directory that could not be read (EACCES on a locked subdirectory,
EPERM, ELOOP) was turned into a skipped entry. The tool then reported
success with a result set that was quietly short, and the caller had no
way to tell the matches from a complete search were all of them.
Only the path validation needs the guard: it is what rejects a symlink
resolving outside the allowed roots, and that stays a silent skip.
Everything after it is the search, so a failure there propagates, which
is what buildTree and listDirectory in the same server already do.1 parent f46d957 commit a7c7eec
2 files changed
Lines changed: 48 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
444 | 471 | | |
445 | 472 | | |
446 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
457 | 464 | | |
458 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
459 | 469 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
464 | 474 | | |
465 | | - | |
| 475 | + | |
466 | 476 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
471 | 481 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 482 | + | |
| 483 | + | |
477 | 484 | | |
478 | 485 | | |
479 | 486 | | |
| |||
0 commit comments