diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java index eec490b..d40acf5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java @@ -293,6 +293,12 @@ char[] path = (filterPath.replace('/', '\\') + "\0").toCharArray(); if (COM.SHCreateItemFromParsingName(path, 0, COM.IID_IShellItem, ppv) == COM.S_OK) { IShellItem psi = new IShellItem(ppv[0]); + /* + * SetDefaultFolder does not work if the dialog has + * persisted recently used folder. The fix is to clear the + * persisted data. + */ + fileDialog.ClearClientData(); fileDialog.SetDefaultFolder(psi); psi.Release(); }