| Ant automatically doubles backslashes on MacOS X | Ant automatically doubles backslashes on MacOS X 2003-02-07 - By Thorsten Sturm
Hi,
I'm currently facing a serious problem using Ant on MacOS X using JDK 1.4.1. When trying to compile files containing strings with backslashes in it, Ant automatically adds unwanted backslashes to it. E.g.
if (directory.endsWith("\\")) {
which is perfectly valid, get's evaluated to
if (dierctory.endsWith("\\\")) {
which apparently is wrong.
To prevent misunderstandings, the source file is left untouched but the compiler complains about the extra backslash. The same code and build file is used under Win and Linux without any problems. It is also not an issue of the compile itself, because using IDEs with built in compiling features (like Eclipse or IDEA) the same source code compiles fine even under MacOS X. Unfortunately, I have to use the buildscript.
Please let me know if you have any idea how to get rid of these extra backslashes (despite using File where appropriate).
Thorsten
|
|
 |