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 26765] New: - "-f" option works incorrectly if path includes "../"
Date Sat, 07 Feb 2004 23:37:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.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://nagoya.apache.org/bugzilla/show_bug.cgi?id=26765

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

           Summary: "-f" option works incorrectly if path includes "../"
           Product: Ant
           Version: 1.6.1beta1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Other
        AssignedTo: dev@ant.apache.org
        ReportedBy: ian@iosphere.net


"basedir" appears to be derived by countin slashes from current directory
instead of counting up for each slash, down for ".." and no change for each "."

In particular, for file ~/j/src/ca/gorman/io/build.xml,

  "ant clean" works from ~/j/src/ca/gorman/io
  "ant -f io/build.xml clean" works from ~/j/src/ca/gorman

  "ant -f ../io/build.xml clean" fails from ~/j/src/ca/gorman/xml

A console log follows.  The echo line reports ${basedir} and the
exec line is executing a "pwd".

Ian E. gorman   ian@iosphere.net

ian@ian:~/j/src/ca/gorman/io
>ant -version
Apache Ant version 1.6.1beta1 compiled on January 29 2004
ian@ian:~/j/src/ca/gorman/io
>ant clean
Buildfile: build.xml

init:
     [echo] /home/ian/j/src
     [exec] /home/ian/j/src



setup:

clean:

clean:

BUILD SUCCESSFUL
Total time: 3 seconds
ian@ian:~/j/src/ca/gorman/io
>cd ..
ian@ian:~/j/src/ca/gorman
>ant -f io/build.xml clean
Buildfile: io/build.xml

init:
     [echo] /home/ian/j/src
     [exec] /home/ian/j/src



setup:

clean:

clean:

BUILD SUCCESSFUL
Total time: 3 seconds
ian@ian:~/j/src/ca/gorman
>cd xml
ian@ian:~/j/src/ca/gorman/xml
>ant -f ../io/build.xml clean
Buildfile: ../io/build.xml

init:
     [echo] /home/ian/j/src/ca/gorman
     [exec] /home/ian/j/src/ca/gorman



setup:

clean:

BUILD FAILED
/home/ian/j/src/ca/gorman/io/build.xml:80: Basedir
/home/ian/j/src/ca/gorman/ca/gorman/io/demo/doc-files does not exist

Total time: 1 second
ian@ian:~/j/src/ca/gorman/xml
>

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


Mime
View raw message