Browse Source

document that <delete dir=...> doesn't play well with symlinks. PR 45742.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@713671 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
c27376e220
2 changed files with 7 additions and 7 deletions
  1. +7
    -0
      docs/manual/CoreTasks/delete.html
  2. +0
    -7
      src/tests/antunit/taskdefs/delete-and-symlinks-test.xml

+ 7
- 0
docs/manual/CoreTasks/delete.html View File

@@ -45,6 +45,13 @@ and it doesn't seem to work, read up on the
in <strong>Directory-based Tasks</strong>, and see the
<code>defaultexcludes</code> attribute below.

<p>For historical reasons <code>&lt;delete dir="x"/&gt;</code> is
different from <code>&lt;delete&gt;&lt;fileset
dir="x"/&gt;&lt;/delete&gt;</code>, it will try to remove everything
inside "x" including "x" itself, not taking default excludes into
account, blindly following all symbolic links. If you need more
control, use a nested <code>&lt;fileset&gt;</code>.</p>

<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>


+ 0
- 7
src/tests/antunit/taskdefs/delete-and-symlinks-test.xml View File

@@ -31,13 +31,6 @@
<symlink action="delete" link="${link}"/>
</target>

<target name="xtestLinkCycle" if="unix">
<mkdir dir="${input}/A/B"/>
<property name="link" location="${input}/A/B/C"/>
<symlink link="${link}" resource="${input}/A"/>
<delete dir="${input}"/>
</target>

<target name="testNotFollowedLink" if="unix">
<mkdir dir="${input}/A/B"/>
<mkdir dir="${input}/C"/>


Loading…
Cancel
Save