On Fri, 2 Feb 2024 21:20:29 GMT, Eirik Bjørsnøs <eir...@openjdk.org> wrote:
>> Please review this PR to fix to a regression in ZipFileSystem, introduced by >> JDK-8322565 in PR #17170. >> >> When `Files.setPosixFilePermissions` is called on an existing MSDOS entry, >> then `Entry.posixPerms` field will be -1 (all 1s in binary). The logic >> introduced by JDK-8322565 did not account for this and incorrectly sets the >> leading seven bits to all ones instead of all zeros. >> >> The fix is to introduce a branch for `Entry.posixPerms` being -1 and deal >> with that case separately. >> >> The PR adds a test case to `TestPosix` which reproduces the regression. >> While visiting this test, I also fixed an incorrect spelling of >> `setPosixFilePermissions` (also introduced by #17170). > > Eirik Bjørsnøs has updated the pull request incrementally with one additional > commit since the last revision: > > For clarity, add comments with the before/after zipdetails output of the > relevant CEN fields Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/17556#pullrequestreview-1860426767