You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/03/22 18:45:24 UTC

DO NOT REPLY [Bug 22632] Delete follows symbolic links to directories

https://issues.apache.org/bugzilla/show_bug.cgi?id=22632


Brianna Sollandry <br...@hambo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brianna@hambo.com




--- Comment #8 from Brianna Sollandry <br...@hambo.com>  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
directory.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.