mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
ERROR_NOT_SUPPORTED from GetFileInformationByName()
Even if the `GetFileInformationByName()` API is supported by the OS, the
API may return with the error `ERROR_NOT_SUPPORTED` for certain
endpoints like OneDrive folders mounted on SMB. Prior to this patch,
this caused the call to read filesystem attributes to terminate with the
`java.nio.file.FileSystemException` ("The request is not supported").
This patch fixes the problem so that when `GetFileInformationByName()`
fails with `ERROR_NOT_SUPPORTED`, then we drop to the slow path (opening
the file handle, calling `GetFileInformationByHandle()`, followed by
closing the file handle.
Reproducing this problem requires both OneDrive folders and SMB shares,
so (as far as I am aware) it's not possible to recreate the environment
in a test.
Welcome to the JDK!
For build instructions please see the online documentation, or either of these files:
- doc/building.html (html version)
- doc/building.md (markdown version)
See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.
Description
Languages
Java
73.9%
C++
14.3%
C
7.8%
Assembly
2.7%
Objective-C
0.4%
Other
0.7%