RFR: 8003887: File.getCanonicalFile() does not resolve symlinks on MS Windows [v2]
Brian Burkhalter
bpb at openjdk.org
Tue Sep 3 16:07:24 UTC 2024
On Tue, 3 Sep 2024 15:56:36 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> Can you check the tests in java/nio/file. I think they may skip if Files.createSymbolicLink fails, which it might do some Windows test machines but not others.
>From `Links.java`:
// Check if sym links are supported
try {
Files.createSymbolicLink(link, Paths.get("foo"));
Files.delete(link);
} catch (UnsupportedOperationException x) {
// sym links not supported
return;
} catch (IOException x) {
// probably insufficient privileges to create sym links (Windows)
return;
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20801#issuecomment-2326897717
More information about the core-libs-dev
mailing list