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 40281] New: - "Cannot resolve path" error thrown gratuitously
Date Thu, 17 Aug 2006 19:41:38 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=40281>.
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=40281

           Summary: "Cannot resolve path" error thrown gratuitously
           Product: Ant
           Version: 1.6.5
          Platform: All
               URL: http://www.netbeans.org/nonav/issues/show_bug.cgi?id=828
                    33
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P3
         Component: Core
        AssignedTo: jglick@netbeans.org
        ReportedBy: jglick@netbeans.org
                CC: dev@ant.apache.org


FileUtils.normalize throws an undocumented BuildException if passed a string
such as "/a/../../b". Clearly it cannot normalize the ".." sequences. But IMHO
it is better to simply leave the path alone in this case. For example, the
referenced NB bug refers to a build script which has

<path id="...">
  <!-- try one thing -->
  <pathelement location="lib/something.jar"/>
  <!-- if that was invalid, try another thing -->
  <pathelement location="../../lib/something-else.jar"/>
</path>

You expect missing or invalid entries to simply be ignored, and that is what
usually happens. But if the basedir of the project happens to be e.g. "c:\foo"
then you will instead get

Cannot resolve path: c:\foo\..\..\lib\something-else.jar

which is true but not what you care about.

Patch corrects this so normalize just quietly returns the unnormalized path.

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

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


Mime
View raw message