You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Diane Holt <ho...@yahoo.com> on 2000/09/30 05:15:57 UTC

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

Thanks,
Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

RE: Foreslashes vs. backslashes

Posted by Adam Murdoch <ad...@yahoo.com>.
Hi,

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

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


Adam

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Saturday, 30 September 2000 1:16 PM
To: ant-dev@jakarta.apache.org
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.)

Thanks,
Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com