Hi,
On Wed, 2003-02-12 at 12:45, Jeroen Frijters wrote:
> On Windows new File("c://") hangs (infinite loop), please apply the
> following patch:
Thanks. Applied as follows:
2003-02-12 Jeroen Frijters <[EMAIL PROTECTED]>
* java/io/File.java (File(String)): Only remove tail separators while
path isn't the root directory.
Could you submit patches as cvs diff -u in the future and make sure that
your mailer doesn't line-wrap? Preferrable with a ChangeLog entry. Also
adding the patch to the savannah patch manager makes sure that it will
not get lost.
Cheers,
Mark
Index: java/io/File.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/File.java,v
retrieving revision 1.21
diff -u -r1.21 File.java
--- java/io/File.java 29 Nov 2002 18:41:04 -0000 1.21
+++ java/io/File.java 12 Feb 2003 21:24:53 -0000
@@ -331,8 +331,8 @@
if (path == null)
throw new NullPointerException("File name is null");
- if (!PlatformHelper.isRootDirectory(path))
- while (PlatformHelper.endWithSeparator(path))
+ while (!PlatformHelper.isRootDirectory(path)
+ && PlatformHelper.endWithSeparator(path))
path = PlatformHelper.removeTailSeparator(path);
}
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath