mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8232092: (fs) Files::isWritable returns false on a writeable root directory (win)
Reviewed-by: alanb
This commit is contained in:
parent
5a9bd41e79
commit
abe2593772
2 changed files with 483 additions and 1 deletions
|
@ -82,7 +82,12 @@ class WindowsFileStore
|
|||
try {
|
||||
return createFromPath(target);
|
||||
} catch (WindowsException e) {
|
||||
if (e.lastError() != ERROR_DIR_NOT_ROOT)
|
||||
// GetVolumePathName might return the following error codes
|
||||
// when the drives were created using `subst`.
|
||||
// Try expanding the path again in such cases.
|
||||
if (e.lastError() != ERROR_DIR_NOT_ROOT &&
|
||||
e.lastError() != ERROR_INVALID_PARAMETER &&
|
||||
e.lastError() != ERROR_DIRECTORY)
|
||||
throw e;
|
||||
target = WindowsLinkSupport.getFinalPath(file);
|
||||
if (target == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue