ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Bringing up an old issue that was never addressed: includeemptydirs on delete
Date Mon, 08 May 2006 20:22:22 GMT
OK, now I'm pretty confident everything's working as expected.

> Desired outcome:
> files test/something.ini, test/test1/test2/another.ini deleted
> dirs test3 and test2 deleted as both are now empty.

test3 *would* be deleted if you included it somehow. One way would be
to have an <emptydir /> file selector, which would additionally and
optionally recognize the recursive case when a dir contains only
"empty" dirs because they contain only empty dirs, etc...

test2 OTOH would never be deleted because it *becomes* empty after the
fact. 2 <delete> could work around that, at the expense of a second
scan.

What you want is actually implemented (originally by me ;-) in <sync>,
which removes empty dirs (recursively) in a 3rd pass, once files have
been added and removed... But that's not <delete>

> Using an excludes pattern [...], it does exactly as desired,
> but it's kind of hacky as you have to think backwards

Agreed. --DD

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


Mime
View raw message