Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

filesystem: search_files silently skips a subdirectory it cannot read

Đang mở
#5,189 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend

Hướng nghiên cứu

Start with searchFilesWithValidation in src/filesystem/lib.ts and trace how its per-entry catch handles validation failures and errors from recursive reads. Compare the failure behavior with directory_tree and list_directory; decide with maintainers whether walking errors should be reported or mark results partial. Done when validation failures remain silently skipped while walking errors are surfaced or the partial result is identified.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug server-filesystem v2
Problem

In searchFilesWithValidation (src/filesystem/lib.ts), one try { … } catch { continue; } wraps the per-entry path validation, the match and the recursive descent. The catch is there to skip entries that resolve outside the allowed directories, but it also discards I/O errors such as EACCES from reading a subdirectory. search_files then returns a short result with no sign that it is incomplete, while directory_tree and list_directory report the same failure as an error.

Expected

Only validation failures are skipped silently. An error while walking is either reported, or the result states that it is partial; which of the two is a maintainer's call.

Prior work
  • #4910 by @feiiiiii5

The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.

Ngôn ngữ chính
TypeScript
Star
91.6k
Fork
11.9k
Merge trung bình
6 giờ 2 phút
Pull request đã merge (30 ngày)
162

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/servers

Tất cả issue của modelcontextprotocol/servers

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.