ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32977] - Ant handles ".." in paths incorrectly
Date Thu, 06 Jan 2005 23:08:03 GMT
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=32977>.
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=32977





------- Additional Comments From ips@apache.org  2005-01-07 00:08 -------
I had an Ant script that contains:

     <available file="../../../../webapps/wsrf" type="dir" 
property="dist.wsrf.webapp.dir" value="../../webapps/wsrf" />         
     <condition property="wsrf.webapp.dir" value="${dist.wsrf.webapp.dir}">
        <isset property="dist.wsrf.webapp.dir"/>
     </condition>     

This Ant script was designed to be able to be run from two possible locations, 
one in which "../../../../webapps/wsrf" exists and one in which it does not 
(because "../../../.." ends up resolving to C:/). Unfortunately, this logic was 
not possible, because the Ant available task aborts with the "The file or path 
you specified (..) is invalid relative to C:\" error. Whereas what I would have 
expected it to do would be to simply not set the status property, since 
C:\webapps\wsrf does not exist. 

I'm sure there are many use cases like this, where trying to do file existence 
checks in Ant the same way developers are used to in Unix, Windows, Java, C, 
Perl, etc. will backfire because of Ant's inconsistent way of handling "..".


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message