DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22632>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22632 Delete follows symbolic links to directories ------- Additional Comments From [EMAIL PROTECTED] 2003-08-25 15:08 ------- Changing past behavior breaks back compatability. It is entirely possible that there is some segment of the ant user comunity that is relying on the link following behavior. There is a strong bias against breaking builds that used to work. As for deleting a symlink, yes that is possible IF the user has the ability to rename the *target* of the link. The trick is to rename the target (causing a broken link) which will then be deleted. After the link is deleted, the target's name is restored. This round about approach is a limitation of the "Java knows nothing about symlinks" problem. It is unclear why broken links can be deleted, but that is how it seems to work. I have implemented a <symlink action="delete"> wich will be available in 1.6 (and is currently available in nightly builds), so I suspect it would be feaseable to write a selector that selected symlinks (noone has done this yet, but it shouldn't be too hard using the org.apache.tools.ant.util.FileUtils.isSymbolicLink(File parent, String name) method, and then feed the results of the selector that to symlink delete before doing your delete of the directory. But if the user running the build doesn't have enough access to the *target* of the link it will still fail because <symlink> uses the technique mentioned above. Perhaps with the advent of the Tiger 1.5 java release, which is supposed to have better support for dealing with native filesystems, this can be improved (for those who run ant using Tiger... The same old reflect or fallback pattern that we used for all the 1.1 compatability stuff will apply). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]