jdk/src/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java
changeset 23887 7b2fb8d5f6be
parent 23010 6dadb192ad81
equal deleted inserted replaced
23886:6cb6ad1e208f 23887:7b2fb8d5f6be
   382         if (!hasDesiredAccess(file, mask))
   382         if (!hasDesiredAccess(file, mask))
   383             throw new AccessDeniedException(
   383             throw new AccessDeniedException(
   384                 file.getPathForExceptionMessage(), null,
   384                 file.getPathForExceptionMessage(), null,
   385                 "Permissions does not allow requested access");
   385                 "Permissions does not allow requested access");
   386 
   386 
   387         // for write access we neeed to check if the DOS readonly attribute
   387         // for write access we need to check if the DOS readonly attribute
   388         // and if the volume is read-only
   388         // and if the volume is read-only
   389         if (w) {
   389         if (w) {
   390             try {
   390             try {
   391                 WindowsFileAttributes attrs = WindowsFileAttributes.get(file, true);
   391                 WindowsFileAttributes attrs = WindowsFileAttributes.get(file, true);
   392                 if (!attrs.isDirectory() && attrs.isReadOnly())
   392                 if (!attrs.isDirectory() && attrs.isReadOnly())
   551         if (target.type() == WindowsPathType.DRIVE_RELATIVE) {
   551         if (target.type() == WindowsPathType.DRIVE_RELATIVE) {
   552             throw new IOException("Cannot create symbolic link to working directory relative target");
   552             throw new IOException("Cannot create symbolic link to working directory relative target");
   553         }
   553         }
   554 
   554 
   555         /*
   555         /*
   556          * Windows treates symbolic links to directories differently than it
   556          * Windows treats symbolic links to directories differently than it
   557          * does to other file types. For that reason we need to check if the
   557          * does to other file types. For that reason we need to check if the
   558          * target is a directory (or a directory junction).
   558          * target is a directory (or a directory junction).
   559          */
   559          */
   560         WindowsPath resolvedTarget;
   560         WindowsPath resolvedTarget;
   561         if (target.type() == WindowsPathType.RELATIVE) {
   561         if (target.type() == WindowsPathType.RELATIVE) {