RFR: 8293122: (fs) Use file cloning in macOS version of Files::copy method [v2]
Brian Burkhalter
bpb at openjdk.org
Thu Sep 8 23:17:39 UTC 2022
On Wed, 7 Sep 2022 15:04:32 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8293122: Revert BsdFileStore; move volume capability check to BsdNativeDispatcher
>
> src/java.base/macosx/classes/sun/nio/fs/BsdFileSystem.java line 101:
>
>> 99: BsdFileStore bfs = (BsdFileStore)provider().getFileStore(src);
>> 100: if (!bfs.equals(provider().getFileStore(dst.getParent())) ||
>> 101: !bfs.supportsCloning())
>
> Is 'dst' a relative path, in which case you can't rely on getParent. In any case, I don't think we should be checking the FileStore here as that means finding the mount entry. If we do clonefile then I think you'll have to rely on the EXDEV error.
Fixed in a7917d2216f111d2aa2d3190c927d5897c826da1.
-------------
PR: https://git.openjdk.org/jdk/pull/10188
More information about the nio-dev
mailing list