https://bz.apache.org/bugzilla/show_bug.cgi?id=63956

            Bug ID: 63956
           Summary: <delete> with followSymlinks="false" fails to delete
                    directory
           Product: Ant
           Version: 1.10.5
          Hardware: Macintosh
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

$ ant -version
Apache Ant(TM) version 1.10.5 compiled on July 10 2018

This task simply does not work:

    <delete dir="somedir" followSymlinks="false"/>

Example:

When I run "ant" with this "build.xml":

  <project name="ant-bug" default="test">
    <target name="test">
        <echo message="creating somedir..."/>
        <mkdir dir="somedir"/>
        <echo message="showing somedir (it should be there)..."/>
        <exec executable="/bin/ls" logError="true" failonerror="true">
            <arg value="-ld"/>
            <arg value="somedir"/>
        </exec>
        <echo message="deleting somedir..."/>
        <delete dir="somedir" followSymlinks="false"/>
        <echo message="showing somedir (it should NOT be there)..."/>
        <exec executable="/bin/ls" logError="true" failonerror="true">
            <arg value="-ld"/>
            <arg value="somedir"/>
        </exec>
    </target>
  </project>

I get this output:

Buildfile: /Users/archie/Downloads/ant-bug/build.xml

test:
     [echo] creating somedir...
    [mkdir] Created dir: /Users/archie/Downloads/ant-bug/somedir
     [echo] showing somedir (it should be there)...
     [exec] drwxr-xr-x  2 archie  staff  64 Nov 22 15:50 somedir
     [echo] deleting somedir...
     [echo] showing somedir (it should NOT be there)...
     [exec] drwxr-xr-x  2 archie  staff  64 Nov 22 15:50 somedir

BUILD SUCCESSFUL
Total time: 0 seconds

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to