Bug 34962 - <move> task behaves differently in 1.6.3 than 1.6.2
Summary: <move> task behaves differently in 1.6.3 than 1.6.2
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.3
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: 1.6.5
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-18 19:17 UTC by Jason M. Fox
Modified: 2008-02-22 12:18 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason M. Fox 2005-05-18 19:17:23 UTC
The <move> task behaves differently in 1.6.3 than in 1.6.2.

The following setup exhibits the difference.

SETUP
-----
Directory structure and contents:

build.xml
dirA
  -> dirB
     -> fileA


BUILD.XML
---------
<project name="ant 1.6.3 move/copy test" default="main" basedir="." >
  <target name="main" >
    <move todir="${basedir}">
      <fileset dir="dirA/dirB" />
    </move>
  </target>
</project>


If the above ant build script is run with ant 1.6.2 the resulting directory
structure and contents are as follows:

1.6.2
-----

build.xml
dirA
fileA

However, the following error is reported when run with ant 1.6.3:

1.6.3
-----
BUILD FAILED
/home/jmfox/ant-test/build.xml:3: Cannot replace directory /home/jmfox/ant-test
with directory /home/jmfox/ant-test/dirA/dirB



Obviously, I realize there are workarounds for the above problem (for instance,
a <copy> and <delete> do the trick), but I am curious as to whether this is an
intended change in behavior.

Thanks,
 -Jason
Comment 1 Matt Benson 2005-05-19 16:24:25 UTC
This was a change that only made it into 1.6.3 by accident.  Working to remedy
this now.
Comment 2 Matt Benson 2005-05-19 18:57:51 UTC
Unfortunately I was too late to get this fix into the 1.6.4 release.  This is
fixed in the CVS HEAD version of Ant as well as in the 1.6 branch of Ant's CVS
for any future releases in the 1.6 series.
Comment 3 Darin Swanson 2005-05-19 21:42:21 UTC
Is there any way Ant 1.6.4 could be re-reved for this problem? So close and 
yet so far :-)