< prev index next >

## src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java

Print this page

    @@ -242,11 +242,15 @@
         public static ShellFolder getShellFolder(File file) throws FileNotFoundException {
             if (file instanceof ShellFolder) {
                 return (ShellFolder)file;
             }

    -        if (!Files.exists(Paths.get(file.getPath()), LinkOption.NOFOLLOW_LINKS)) {
    +        try {
    +            if (!Files.exists(Paths.get(file.getCanonicalPath()), LinkOption.NOFOLLOW_LINKS)) {
    +                throw new FileNotFoundException();
    +            }
    +        } catch (IOException ex) {
                 throw new FileNotFoundException();
             }
             return shellFolderManager.createShellFolder(file);
         }

< prev index next >