ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <>
Subject RE: Foreslashes vs. backslashes
Date Sat, 30 Sep 2000 04:17:09 GMT


One possible culprit:  Project.resolveFile().  This is used almost
everywhere in ant to convert a user supplied file name into a File object.
However, it does not call File.getCanonicalPath() on the return value if the
file name is absolute.  It does if the file name is relative.

On newer JVMs, this doesn't matter, since the File class automatically
translates all '/' and '\' characters to the appropriate value for the

On older JVMs, however, File does nothing to the supplied value.  So, when
ant later uses the file by calling toString() or getAbsolutePath(),
sometimes the file contains '/' (if the user supplied file name was
absolute) and sometimes '\' (if the file name was relative).


-----Original Message-----
From: Diane Holt []
Sent: Saturday, 30 September 2000 1:16 PM
Subject: Foreslashes vs. backslashes

I'm running ant on an NT, so ant thinks I'm a backslashes system, but I
run under MKS on the NT, so I don't really need all the fore-to-backslash
conversion. And it turns out ant only does it for some paths, not for all
paths, so I end up looking at output that's full of separator stew. Is
there any way around this? (I'm thinking people using cygwin bash would
have a similar situation.)



Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!

Do You Yahoo!?
Get your free address at

View raw message