ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 22632] Delete follows symbolic links to directories
Date Sat, 22 Mar 2008 17:45:24 GMT

Brianna Sollandry <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #8 from Brianna Sollandry <>  2008-03-22 10:45:24 PST ---
I just got bit - hard - by this issue.

I'm running OS X 10.5.2.
I have Ant 1.7.0.

 I had the following in my build.xml:

<mkdir dir="${dist}/temp"/>
<symlink action="single" link="${dist}/temp/Applications"
resource="/Applications" />
<delete dir="${dist}/temp" />

In other words, I created a temporary directory, stuck in a symbolic link to
/Applications, did some stuff, and deleted the temporary directory.

Ant proceeded to delete 7,800 some files out of /Applications. Fortunately, I
run Time Machine and was able to recover completely within 20 minutes or so.
But, it was pretty unnerving.

Considering that a recursive delete from the shell deletes the symbolic link
rather than following it and deleting at the target, it never occurred to me
that the ant delete task would behave this way.

Unfortunately, as I just reported in another bug report, <symlink
action="delete" ...>" doesn't work for me, so I can't clean up my temp

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

View raw message