JDK-6488082 : JFileChooser on Vista: User dirs not shown properly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2006-10-31
  • Updated: 2011-02-16
  • Resolved: 2007-03-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u12Resolved 6u1Resolved
Related Reports
Duplicate :  
Relates :  
Description
In Ocean L&F the user directories are not shown properly when viewed from "Desktop" folder (click "Look In", select "Desktop") - they're shown as some long sequence of letters/digits (a GUID?).

You also can't enter the dir, but that is being covered under 6488081.

Comments
SUGGESTED FIX Only one place was updated to pass the extra flag. Win32ShellFolder.java's getFileSystemPath() method was updated. In the place where we call into the native code to fetch the display name, we now pass the SHGDN_FORADDRESSBAR flag when on Vista.
06-11-2006

EVALUATION Win32ShellFolder.java's getFileSystemPath() method was updated. In the place where we call into the native code to fetch the display name, we now pass the SHGDN_FORADDRESSBAR flag when on Vista.
06-11-2006

SUGGESTED FIX In win32ShellFolder2.java, add SHGDN_FORADDRESSBAR with logical OR to the attributes argument for calls to getDisplayNameOf in line 497: return getDisplayNameOf(parentIShellFolder, relativePIDL, SHGDN_NORMAL | SHGDN_FORPARSING); and 714: displayName = getDisplayNameOf(getParentIShellFolder(), getRelativePIDL(), SHGDN_NORMAL);
31-10-2006

EVALUATION The cause of this issue is described here: http://support.microsoft.com/kb/198871 Some exctractions from there: ========================================== SYMPTOMS On Windows 2000, calling the desktop's IShellFolder::GetDisplayNameOf with SHGDN_FORPARSING for a namespace extension returns a name with GUIDs in it rather than actual display names. ... [GetDisplayNameOf] returns a name such as: ::{<GUID for My Computer>}\{<GUID for Control Panel>} rather than the following expected text: Control Panel Some folders may return a name such as: My Computer\::{GUID for the requested item} instead of returning the GUID for "My Computer." ... CAUSE This behavior is due to a design change in the Windows 2000 desktop. ... RESOLUTION To retrieve the actual display text, you need to add the SHGDN_FORADDRESSBAR flag ... STATUS This behavior is by design.
31-10-2006