On 19 May 2003, <[EMAIL PROTECTED]> wrote:
> Don't remove basedirectories of <fileset>s that just happen to be
> matched completely.
This introduces a backwards incompatibility and maybe even
inconsistency, that's why I haven't closed the bug report yet. I'm
asking for feedback here.
The bug report complains about this situation:
<move todir="foo">
<fileset dir="bar" includes="baz"/>
</move>
will remove the directory bar, if there is no other file but baz in
in. If there happens to be a file zyzzy, the directory is retained.
The complaint is that Ant could know that you didn't intend to move
the whole set - you wouldn't have used includes otherwise.
So now the above will retain the "bar" directory while
<move todir="foo">
<fileset dir="bar"/>
</move>
will remove it.
This seems to be consistent with the docs that say
,----
| Move a set of files to a new directory
|
| <move todir="some/new/dir">
| <fileset dir="my/src/dir">
| <include name="**/*.jar"/>
| <exclude name="**/ant.jar"/>
| </fileset>
| </move>
`----
and not "move a complete directory tree if all files are included".
Stefan