ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26683] New: - Renaming of nonexistent files deletes the folder
Date Thu, 05 Feb 2004 12:21:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26683>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26683

Renaming of nonexistent files deletes the folder

           Summary: Renaming of nonexistent files deletes the folder
           Product: Ant
           Version: 1.5.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: tuor07@yahoo.de


I encountered an unexpected behaviour of the move task.
If you try to rename files within the same folder but the nested fileset does 
not yield any files, the folder itself will be deleted.
This behaviour is not documented and I think also not intended.

Here is an example project reproducing the problem:

<project name="test" default="dist" basedir=".">

    <target name="dist">
      <!-- create an empty folder -->
      <mkdir dir="test"/>
      
      <!-- try to rename (nonexistent) files -->
      <move toDir="test">
        <fileset dir="test" includes="**"/>
        <mapper type="glob" from="*.java" to="*.bak"/>
      </move>

      <!-- now the folder is gone -->      
      <available property="check" file="test"/>
      <echo message="${check}"/>
      
    </target>
    
</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message