ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [Fwd: Bug with <delete includeEmptyDirs> ?]
Date Wed, 14 Mar 2001 12:27:07 GMT
Glenn McAllister <> wrote:

> When I'm chosing what directories to delete, I'm using the
> DirectoryScanner.getIncludedDirs method.  The assumption is that
> since we are using a fileset, we should only try to delete matching
> empty directories.  The funny thing is, if the match pattern is
> "**" (which seems to be a pretty common case), only leaf
> directories are returned as a match.

Looked into it. DirectoryScanner is right 8-) you just get the
directories in an order you didn't expect.

If you have a/b/c/d and a is the basedir, getIncludedDirectories will
give you b, b/c and b/c/d - and Delete tries to delete them in that
order. As b is not empty (as long as b/c exists) it wil be omitted,
same for b/c because of b/c/d.

I've reversed the order in which Delete tries to remove the
directories - and it works now.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message