提交 0d224224 编写于 作者: V vikram

7012783: JFileChooser fails to resolve DFS links on Windows Vista SP2

Summary: Changes to code to handle DFS links
Reviewed-by: rupashka
上级 e655854a
......@@ -1153,10 +1153,15 @@ public class BasicFileChooserUI extends FileChooserUI {
if (shellFolder.isLink()) {
File linkedTo = shellFolder.getLinkLocation();
if (linkedTo != null && fc.isTraversable(linkedTo)) {
dir = linkedTo;
// If linkedTo is null we try to use dir
if (linkedTo != null) {
if (fc.isTraversable(linkedTo)) {
dir = linkedTo;
} else {
return;
}
} else {
return;
dir = shellFolder;
}
}
} catch (FileNotFoundException ex) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册