This patch fixes PR swing/23037 where the "directory up" button in
JFileChoosers wasn't stopping at the top of the directory structure, but
rather bouncing back to the user's home directory.
Patch attached.
2005-08-31 Anthony Balkissoon <[EMAIL PROTECTED]>
PR swing/23037
* javax/swing/JFileChooser.java
(changeToParentDirectory): If parent directory is null, do nothing.
--Tony
Index: javax/swing/JFileChooser.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JFileChooser.java,v
retrieving revision 1.13
diff -u -r1.13 JFileChooser.java
--- javax/swing/JFileChooser.java 11 Jul 2005 19:57:23 -0000 1.13
+++ javax/swing/JFileChooser.java 31 Aug 2005 19:16:42 -0000
@@ -415,7 +415,8 @@
*/
public void changeToParentDirectory()
{
- setCurrentDirectory(fsv.getParentDirectory(currentDir));
+ if (fsv.getParentDirectory(currentDir) != null)
+ setCurrentDirectory(fsv.getParentDirectory(currentDir));
}
/**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches