(fs) CopyMoveHelper.copyToForeignTarget use of sourcePosixView is confusing

XMLWordPrintable

    • b25
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Windows, Java 21

      A DESCRIPTION OF THE PROBLEM :
      shouldn't linkOptions be used in reading the PosixFileAttributeView too ?

              final PosixFileAttributeView sourcePosixView =
                  Files.getFileAttributeView(source, PosixFileAttributeView.class);

              // attributes of source file
              BasicFileAttributes sourceAttrs = null;
              if (sourcePosixView != null) {
                  try {
                      sourceAttrs = Files.readAttributes(source,
                                                         PosixFileAttributes.class,
                                                         linkOptions);
                  } catch (SecurityException ignored) {
                      // okay to continue if RuntimePermission("accessUserInformation") not granted
                  }
              }



            Assignee:
            Brian Burkhalter
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: