ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Possible bug in Delete task
Date Mon, 01 Jul 2002 05:45:18 GMT
A user posted a question about using <delete> with 'includeEmptyDirs' set
(see: http://marc.theaimsgroup.com/?l=ant-user&m=102546976217819&w=2), and
from looking at Delete.java, I don't see it ever handling this -- but the
doc seems to say it can (but maybe I missed how it's supposed to work).

I've modified Delete.java so it does it now, but I had to do some (maybe
kind of weird?) things to get the potentially empty directories from the
fileset into the "dirs" array -- which is set by a call to
getIncludedDirectories() (which is why I had to do the maybe weird stuff,
to get an already set array to "grow" to include the other dir names),
except the call to getIncludedDirectories() doesn't actually return any
names (which is why the code that's supposed to delete the now-empty
directories never gets executed), and I'm not really sure if that's
expected or not (if it's not, then I've probably made the wrong fix, and
what needs to get fixed instead is getting the names of the file's
directories into "dirs" from the start).

Since this isn't exactly what you'd call a real straightforward change
(although it's actually fairly small, despite the convoluted description
:), I'd really appreciate it if some of the other committers take a look
at it before I submit it. I've done my usual test-by-hand thing, and it
seems to work fine -- but of course, you'll want real testcases stuff as
well, right? (Ugh.)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Mime
View raw message