Testing#4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3db0d7e02
ℹ️ 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".
| const session = this.uploadSessions.get(id); | ||
| if (!session) return null; | ||
| clearTimeout(session.timer); | ||
| this.uploadSessions.delete(id); |
There was a problem hiding this comment.
Keep chunk sessions reserved until commit finishes
If a chunk retry arrives after the last chunk starts finalization but before addFromTemp has renamed/saved the file, this line removes the session from uploadSessions; getOrCreateUploadSession will then create a new session with the same temp path and open it with "w", truncating the file that is being hashed/committed. This can make large uploads fail or store corrupt bytes on flaky connections that retry during the final hash/commit window; keep the session, or a finalizing sentinel, until the file is fully committed.
Useful? React with 👍 / 👎.
| const localHeader = Buffer.alloc(30); | ||
| localHeader.writeUInt32LE(0x04034b50, 0); | ||
| localHeader.writeUInt16LE(20, 4); | ||
| localHeader.writeUInt16LE(0, 6); |
There was a problem hiding this comment.
Set the UTF-8 flag for ZIP entry names
When a folder contains files whose names are not pure ASCII, this ZIP writer stores Buffer.from(entry.name, "utf8") but leaves the general-purpose bit flag at 0 here and in the central-directory header below. ZIP readers interpret names without bit 11 as CP437/local encoding, so files such as résumé.png extract with garbled names even though the bytes are correct; set the UTF-8 flag in both headers when writing UTF-8 name buffers.
Useful? React with 👍 / 👎.
No description provided.