RFR: 8287097: (fs) Files::copy requires an undocumented permission when copying from the default file system to a non-default file system [v2]
Brian Burkhalter
bpb at openjdk.java.net
Wed Jun 1 16:13:42 UTC 2022
On Wed, 1 Jun 2022 06:40:43 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8287097: Ignore SecurityException when attemping to write POSIX permissions
>
> src/java.base/share/classes/java/nio/file/CopyMoveHelper.java line 119:
>
>> 117: PosixFileAttributes.class,
>> 118: linkOptions);
>> 119: } catch (SecurityException ignored) {
>
> Ignoring SecurityException looks right here but you need to do the same with targetPosixView.setPermissions(...) for the case that you are copying from a custom file system that supports permissions to the default file system.
Fixed by 80961915b339fb3bf39acf120e25c363aff16afc.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8963
More information about the nio-dev
mailing list