Skip to content

优化模组信息读取速度#6515

Merged
Glavo merged 2 commits into
HMCL-dev:mainfrom
Glavo:compress-buffer
Jul 26, 2026
Merged

优化模组信息读取速度#6515
Glavo merged 2 commits into
HMCL-dev:mainfrom
Glavo:compress-buffer

Conversation

@Glavo

@Glavo Glavo commented Jul 26, 2026

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the 10+ label Jul 26, 2026
@Glavo

Glavo commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3298d0864

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


public static ZipArchiveReader openZipFile(Path zipFile, Charset charset) throws IOException {
return new ZipArchiveReader(zipFile, charset);
return new ZipArchiveReader(openBufferedChannel(zipFile), charset);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Close the buffered channel when ZIP initialization fails

When the input is a malformed or truncated ZIP, this channel-based ZipArchiveReader constructor does not close its caller-supplied channel if initialization throws. Previously the Path constructor owned and closed the channel on this failure path; now each failed call leaks a file descriptor, so repeated archive probes can eventually prevent the launcher from opening further files. Wrap reader construction so the buffered channel is closed unless ownership is successfully transferred.

Useful? React with 👍 / 👎.

@Glavo
Glavo merged commit 0e0517a into HMCL-dev:main Jul 26, 2026
3 checks passed
@Glavo
Glavo deleted the compress-buffer branch July 26, 2026 23:12
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