refactor: remove zip64 extra field update#732
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request re-implements a previously lost change that removes a redundant update mechanism for ZIP64 extra fields. The modification ensures that the extra field is solely written to the output stream, rather than also being updated in an in-memory structure unnecessarily, thereby fixing a regression caused by an incorrect merge. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
This pull request removes critical synchronization code that keeps in-memory metadata consistent with on-disk data. The deletion of the extra_field update logic (lines 2453-2459) creates a data inconsistency where the cached ZIP64 extra field data no longer reflects what was written to disk. This is a logic error that blocks merge as it can lead to archive corruption or read failures.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
Code Review
This pull request refactors the update_local_zip64_extra_field function. While the intention to simplify the code is good, removing the update to the in-memory extra_field introduces a critical bug. The deep_copy_file function relies on this in-memory field to contain the correct, final sizes for zip64 files. Without the update, it will use placeholder values, leading to corrupt zip entries. I've added a comment with a suggestion to restore the logic while keeping the improved variable naming.
A wrong merge of master deleted these changes form #717