Skip to content

fix: open mime filters by FullPath and close FDs - #355

Open
equationzhao wants to merge 1 commit into
masterfrom
equationzhao/fix-mime-filter-fd-fullpath
Open

fix: open mime filters by FullPath and close FDs#355
equationzhao wants to merge 1 commit into
masterfrom
equationzhao/fix-mime-filter-fd-fullpath

Conversation

@equationzhao

Copy link
Copy Markdown
Owner

Summary

  • Open files via FullPath in MimeTypeOnly / RemoveMimeType so filters work when listing non-cwd paths.
  • Always Close the opened file handle.

Test plan

  • go test ./internal/filter/
  • g --only-mime text/plain /some/other/dir

Made with Cursor

MimeTypeOnly/RemoveMimeType used the basename and never closed the file handle, which broke listing outside cwd and leaked descriptors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_611eb13f-1c8d-4b68-b2d0-0ccb04c04684)

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant