United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6560349 REGRESSION :folder having ".lnk" in the name can not be opened by 5.0 and later versions
JDK-6560349 : REGRESSION :folder having ".lnk" in the name can not be opened by 5.0 and later versions

Details
Type:
Bug
Submit Date:
2007-05-22
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
windows_xp
Sub-Component:
javax.swing
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u1
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
A folder, having the extension .lnk in the name,  can not be opened by 5.0fcs and later versions.

REPRODUCE:
1) Create a folder which has .lnk in the name
  ex.  test.lnk
2) Go to .\jdk1.4.2_14\demo\jfc\FileChooserDemo
3) Invoke "java -jar FileChooserDemo.jar"
4) Click "ShowFileChooser" button
5) Try to open the folder created at step 1)
 5.0fcs and later versions will no be able to open the 1) folder.
 1.4.2_14 can open the folder.

CONFIGURATION:
 OS :WindowsXP(SP2, Japanese)
 JRE : 5.0fcs, 5.0u8, 5.0u11, 6.0u1

                                    

Comments
EVALUATION

In BasicFileChooserUI.java
==================
private void changeDirectory(File dir) {
    JFileChooser fc = getFileChooser();
    // Traverse shortcuts on Windows
    if (dir != null && File.separatorChar == '\\' && dir.getPath().endsWith(".lnk")) {
...
==================

ShellFolder.isLink() should be used instead of string comparison.
                                     
2007-06-05
EVALUATION

Will be fixed in 6u4, after I putback the appropriate fix for JDK 7.
                                     
2007-07-12



Hardware and Software, Engineered to Work Together