ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Tulley" <JTUL...@novell.com>
Subject NetWare To-Do's (was Re: Ant 1.5 To-Do list)
Date Fri, 01 Mar 2002 22:21:09 GMT
Here is a rework of the FileUtils.java patch that will guarantee
backwards compatibility.  Like the PathTokenizer patch, it simply
detects the running OS and only deals with multiple-character volume
names if the OS is Novell NetWare.

So, beyond some expanded "if"s, the only difference between this and
the original code is that at the bottom of resolveFile, where it was
doing all of the real work on the Windows platform, I made that code
generic to handle any size drive name.  Since the if statement above
filtered out the cases that are illegal for the platform, this code
should be OK as is.  This passes the test suite.  I have also attached a
patch of FileUtilsTest, where the NetWare specific test cases are also
only executed on NetWare.

So, for the ultra paranoid that my earlier code would not report an
exception when it had earlier (multiple character drive names on
platforms that do not support this), this patch is better.


Now I need to follow up with some doc.  Any idea on where the doc
should live? (that is, where platform notes should live).

Thanks,
>>> JTULLEY@novell.com 2/26/02 2:52:23 PM >>>
4) org.apache.tools.ant.util.FileUtils  - There were assumptions that
any drive name that came in as part of a path would only be one
character in size, and that was how FileUtils decided that the drive
name needed to be specially dealt with.  NetWare has
multiple-character
drive or volume names, so the code had to be reworked to accept drive
names of any size.  This was in resolveFile and normalize.  Looking at
the code now, the only time that backwards compatibility might be
broken
is if the user passed in an invalid drive name on Windows (cd:\temp
instead of c:\temp")  On Windows, this would have generated a
"cd:\temp
is not an absolute path" message before but now it would pass, since
that path could be valid on NetWare.  So, this could be changed in a
similar manner to PathTokenizer - to actually do a check if the OS we
are RUNNING on is NetWare, and only in that case allow
multiple-character drive names.




Jeff Tulley  (jtulley@novell.com)
(801)861-5322
Novell, Inc., the leading provider of Net business solutions
http://www.novell.com

Mime
View raw message