7012783: JFileChooser fails to resolve DFS links on Windows Vista SP2
Changes to code to handle DFS links Reviewed-by: rupashka
This commit is contained in:
parent
077625bba2
commit
732ac029ec
@ -1153,10 +1153,15 @@ public class BasicFileChooserUI extends FileChooserUI {
|
|||||||
if (shellFolder.isLink()) {
|
if (shellFolder.isLink()) {
|
||||||
File linkedTo = shellFolder.getLinkLocation();
|
File linkedTo = shellFolder.getLinkLocation();
|
||||||
|
|
||||||
if (linkedTo != null && fc.isTraversable(linkedTo)) {
|
// If linkedTo is null we try to use dir
|
||||||
dir = linkedTo;
|
if (linkedTo != null) {
|
||||||
|
if (fc.isTraversable(linkedTo)) {
|
||||||
|
dir = linkedTo;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return;
|
dir = shellFolder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException ex) {
|
} catch (FileNotFoundException ex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user