Description of the bug
The operations implemented in ArchiveUtils assume the target system support POSIX file permissions, but that's not true on Windows machines, leading to errors when trying to set POSIX permissions (e.g. https://github.com/oras-project/oras-java/blob/main/src/main/java/land/oras/utils/ArchiveUtils.java#L429).
In order to make it work on Windows, I guess that at least a check should be added to guard the POSIX-related operations with something like:
FileSystems.getDefault().supportedFileAttributeViews().contains("posix")
I'm available to work on a PR, if this is something you'd like to support in ORAS.
Description of the bug
The operations implemented in
ArchiveUtilsassume the target system support POSIX file permissions, but that's not true on Windows machines, leading to errors when trying to set POSIX permissions (e.g. https://github.com/oras-project/oras-java/blob/main/src/main/java/land/oras/utils/ArchiveUtils.java#L429).In order to make it work on Windows, I guess that at least a check should be added to guard the POSIX-related operations with something like:
FileSystems.getDefault().supportedFileAttributeViews().contains("posix")I'm available to work on a PR, if this is something you'd like to support in ORAS.