You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2008/09/08 15:02:41 UTC

Re: svn commit: r693071 - in /ant/core/trunk:

On Mon, 08 Sep 2008, <bo...@apache.org> wrote:

> URL: http://svn.apache.org/viewvc?rev=693071&view=rev
> Log:
> delete broken symbolic links.  PR 41285

Note there is a certain kind of not-being-BWC in this change.  Prior
to the patch if you said

<delete file="foo"/>

and foo happened to be a symbolic link pointing nowhere, Ant would
not delete anything (and just note that there was no such file in
verbose mode).

<delete dir="foo"/> would even silently ignore it.

Now, not only will <delete> try to delete the link it may also fail
the delete task if File.delete() returns false on the link.

Should we document this more prominently (to me, this is the
behaviour one would actually expect)?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: svn commit: r693071 - in /ant/core/trunk:

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 10 Sep 2008, Kevin Jackson <fo...@gmail.com> wrote:

>> Prior to the patch if you said
>>
>> <delete file="foo"/>
>>
>> and foo happened to be a symbolic link pointing nowhere, Ant would
>> not delete anything (and just note that there was no such file in
>> verbose mode).
>>
>> <delete dir="foo"/> would even silently ignore it.
> 
> This is wrong it should at least report something.

This is just the way java.io.File works for symlinks.  File.exists
would return false and then the old code would simply skip over it.

>> Now, not only will <delete> try to delete the link it may also fail
>> the delete task if File.delete() returns false on the link.
> 
> I think the change should be documented as it is different from past
> behaviour - even if in the past it was buggy behaviour

The change was documented in the "Fixed Bugs" section and now is in
"Changes that could break".

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: svn commit: r693071 - in /ant/core/trunk:

Posted by Kevin Jackson <fo...@gmail.com>.
Hi,

>> URL: http://svn.apache.org/viewvc?rev=693071&view=rev
>> Log:
>> delete broken symbolic links.  PR 41285
>
> Note there is a certain kind of not-being-BWC in this change.  Prior
> to the patch if you said
>
> <delete file="foo"/>
>
> and foo happened to be a symbolic link pointing nowhere, Ant would
> not delete anything (and just note that there was no such file in
> verbose mode).
>
> <delete dir="foo"/> would even silently ignore it.

This is wrong it should at least report something.

>
> Now, not only will <delete> try to delete the link it may also fail
> the delete task if File.delete() returns false on the link.

I think the change should be documented as it is different from past
behaviour - even if in the past it was buggy behaviour

Kev

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org