Integrated: 8324635: (zipfs) Regression in Files.setPosixFilePermissions called on existing MSDOS entries
Eirik Bjørsnøs
eirbjo at openjdk.org
Fri Feb 2 21:53:10 UTC 2024
On Wed, 24 Jan 2024 14:34:03 GMT, Eirik Bjørsnøs <eirbjo at 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).
This pull request has now been integrated.
Changeset: a18b03b8
Author: Eirik Bjørsnøs <eirbjo at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a18b03b86fdd0eef773badbced46607a8e5a068a
Stats: 51 lines in 2 files changed: 49 ins; 0 del; 2 mod
8324635: (zipfs) Regression in Files.setPosixFilePermissions called on existing MSDOS entries
Reviewed-by: lancea
-------------
PR: https://git.openjdk.org/jdk/pull/17556
More information about the core-libs-dev
mailing list