ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liz Burke-Scovill" <fiddledra...@gmail.com>
Subject Bringing up an old issue that was never addressed: includeemptydirs on delete
Date Mon, 08 May 2006 17:09:50 GMT
Hi, I'd like to ask the best way to address this issue. It was originally
brought up in bug report 36048,
http://issues.apache.org/bugzilla/show_bug.cgi?id=36048 , I'm bring it up
here as opposed to user@ant.apache.org, because I see this more as a further
discussion of a task already in bugzilla  as opposed to a usage question.

The issue is that when includeemptydirs is set to "true" on a delete, it
does not appear to work. The first reply indicates that since the patternset
does not include directories, so the directories should not be deleted. I
disagree as it would seem that that would defeat the purpose of having an
optional flag to include empty directories.

I have also found that includeemptydirs works as indicated when an excludes
attribute or exclude node is used with the fileset. For example:

<delete includeemptydirs="true">
   <fileset dir="foo" excludes="**/*.bar" />
</delete>

In this example, it deletes all empty directories. Using false does not
delete empty directories, and as such it works as expected. The following
example:

<delete includeemptydirs="true>
   <fileset dir="foo" includes="**/*.bar" />
</delete>

behaves no differently regardless of whether or not includeemptydirs is set
to true or false. Therefore, either documentation needs to indicate this
behavior, or it should be considered a bug (feature? ;) ) and assigned (I'd
be willing to look at code to work on it).

Additionally, if a delete task with includeemptydirs="true" has both
excludes and includes in its filesets, the behavior displayed is the same as
the second example.

The reason I bring this up here is to further discussion. Is there a reason
that includeemptydirs acts this way with includes? Or is it something that
was overlooked?

Thanks!
Liz Burke-Scovill

--
Imagination is intelligence having fun...
fiddledragon@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message