fix: change directory attributes detection and set external attributes#851
fix: change directory attributes detection and set external attributes#851Its-Just-Nans wants to merge 16 commits into
external attributes#851Conversation
There was a problem hiding this comment.
Review Summary
This PR modifies the directory attributes detection logic in src/types.rs. While the reorganization of constants and improved documentation are good, there is a critical logic error in the MS-DOS symlink detection that needs to be addressed.
Critical Issue
The new symlink check in the System::Dos branch incorrectly interprets the high 16 bits of external_attributes as Unix mode. According to the ZIP specification, for DOS-system archives, only the low 16 bits are meaningful (MS-DOS attributes), and the high 16 bits should not be used for Unix-style mode detection. This could cause incorrect symlink identification.
Recommendations
Before merging, please:
- Review the symlink detection logic for DOS system archives
- Verify the behavior with test cases for DOS archives with and without the symlink bits accidentally set in the high 16 bits
- Ensure the changes align with APPNOTE.TXT section 4.4.15 regarding DOS compatibility
The PR is marked as WIP, so please address this issue before requesting final review.
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.
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
external attributes
fix for #737
As mentioned in #737. An issue was introduced in 072abec (#471). This commit is trying to detect symlink for
System::Dosbut when we useadd_symlinkwe force theSystem::Unix.and fix #433