DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37701>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37701 Summary: Move tasks doesn't execute File.renameTo Product: Ant Version: 1.7Alpha (nightly) Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: dev@ant.apache.org ReportedBy: [EMAIL PROTECTED] The Move task doesn't execute to the File.renameTo to move a file. Even if the code of the Move task seems to indicate that it first tries to use renameTo() before moving the file physically, it doesn't do so. I've noticed it with renaming directories that contains a lot of files or renaming a file with the similar name but with another case. Here is an example: <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="moveTest"> <target name="moveTest" description="Shows that the move tasks doesn't use File.renameTo()"> <echo file="README">Hello world</echo> <available property="readme.exists" file="README"/> <fail message="README file not created" unless="readme.exists"/> <move file="README" tofile="readme" /> <!-- At this point on Windows XP the file disappears --> <available property="readme.exists2" file="readme"/> <fail message="readme file not found" unless="readme.exists2"/> </target> </project> Whereas Java code new File("README").renameTo(new File("readme")); works. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]