DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=26765>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=26765

"-f" option works incorrectly if path includes "../"

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.6.2



------- Additional Comments From [EMAIL PROTECTED]  2004-03-10 10:00 -------
I got this problem to happen:
a build file containing:
<project basedir="../..">
  <echo>basedir is "${basedir}"</echo>
</project>

~/learning/a/dotdot/j/src/ca/gorman/io > ant -f build.xml
basedir is "/home/preilly/learning/a/dotdot/j/src/ca"
~/learning/a/dotdot/j/src/ca/gorman/io > ant -f ../io/build.xml
basedir is "/home/preilly/learning/a/dotdot/j/src/ca/gorman/io"

The problem is that ProjectHelper2 uses File#getAbsolutePath().
getAbsolutePath() does not resolve .. and . in the filename, so
later when FileUtils.resolveFile is used, it generates an incorrect
path.

The solution was to call FileUtils#normalize() on the filename.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to