6560349: REGRESSION :folder having ".lnk" in the name can not be opened by 5.0 and later versions
Reviewed-by: alexp
This commit is contained in:
parent
466eda6ee4
commit
e7c2dc0b7a
@ -1134,11 +1134,16 @@ public class BasicFileChooserUI extends FileChooserUI {
|
|||||||
// Traverse shortcuts on Windows
|
// Traverse shortcuts on Windows
|
||||||
if (dir != null && FilePane.usesShellFolder(fc)) {
|
if (dir != null && FilePane.usesShellFolder(fc)) {
|
||||||
try {
|
try {
|
||||||
File linkedTo = ShellFolder.getShellFolder(dir).getLinkLocation();
|
ShellFolder shellFolder = ShellFolder.getShellFolder(dir);
|
||||||
if (linkedTo != null && fc.isTraversable(linkedTo)) {
|
|
||||||
dir = linkedTo;
|
if (shellFolder.isLink()) {
|
||||||
} else {
|
File linkedTo = shellFolder.getLinkLocation();
|
||||||
return;
|
|
||||||
|
if (linkedTo != null && fc.isTraversable(linkedTo)) {
|
||||||
|
dir = linkedTo;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException ex) {
|
} catch (FileNotFoundException ex) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user