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 Thu, 28 Feb 2002 22:25:38 GMT
Where do we want to go with the following two points?  I verified that
the old behavior is for resolveFile and/or normalize to say "  'SYS:' is
not an absolute path", whereas the patch that I submitted makes it okay
with SYS:, even on Windows or UNIX.  

This can be looked at two ways:  1) Not supporting multiple-character
drive names was a design flaw or bug, and should be corrected, or 2)
Regardless of number one, somebody might be relying on "SYS:" generating
an exception with the error mentioned above, and we want to keep that
functionality on platforms that do not natively recognize "SYS:\temp".

If the answer is number 1 above, we are good to go with the patches
that I have submitted.  If we have to hold to number 2, the only answer
is a fix like that in PathTokenizer - that if the code is actually
running on NetWare, allow multiple-character drive names, otherwise
revert to the old assumption of the path starting with either "/"
(UNIX), or "d:" (for instance, on Windows).

I can go either way, since I don't think it makes much sense to have
"sys:" parsed correctly on Windows or UNIX anyway, unless such a drive
name is in some way possible (ala some sort of cygwin-like emulator but
for NetWare on Windows or UNIX).

Opinions?

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

>>> 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.


5) org.apache.tools.ant.util.FileUtilsTest  - I added in some test
cases for multiple-character volume/drive name support.  If we change
FileUtils to have an if Os.isFamily("netware") (or whatever it is),
then
this test can change also to have the same check and OS dependent
behavior.




--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message