ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Bergbauer" <>
Subject getAbsolutePath vs getCanonicalPath patch plus a couple questions.
Date Tue, 24 Oct 2000 16:42:54 GMT
Hello to all.
No giant release today :-)

I noticed that the testUnique for Path fails on my machine (Win2k) when I use bash under Cygwin
but not under DOS.
The reason for this is that, in the Cygwin environment, File.getAbsolutePath() and File.getCanonicalPath()
not return the same value: if the drive letter is in lowercase (as is c:/data), getAbsolutePath()
will return c:\data,
while getCanonicalPath() returns C:\data.
This causes a problem because:
- Path.addUnlessPresent() is case-sensitive.
- Path.setLocation() and other Path methods use File.getTranslatePath() while Path.setPath()
use File.getCanonicalPath()
  through Project.translatePath().
The solution in my patch is to force Path to use File.getCanonicalPath() because that method
is guaranteed to return
a unique path for any path.
The attached is a 'cvs diff -u' of in the main branch.

I have a couple trivial questions:
- A little while ago, I submitted a very simple fix to the ant.bat file that allowed ANT_HOME
to be determined precisely
  on NT while it had no effect on Win9x. I have seen no reaction to this patch and it never
got checked in.
  Why the silence?
  The following line had to be added to the beginning of ant.bat ('cvs diff -u ' patch included

rem When using Windows NT (or W2K), the path of the batch file
rem (and therefore ANT_HOME) can be determined.
if not "%OS%"=="Windows_NT" goto start

- I noticed that in the <runtests> and <run.single.test> targets of the ant build.xml,
the junit task no longer has the
  fork attribute set to true. This is quite annoying since changes made to the local source
of ant will not be picked up when
  running the tests. What was the rational behind this  (I know it is easy to change build.xml,
but I would like a reason)?


View raw message