system case changing renames. Bugzilla 37701; submitted by Anthony Goubard. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@405846 13f79535-47bb-0310-9956-ffa450edef68master
@@ -6,6 +6,7 @@ Andreas Mross | |||||
Andrew Everitt | Andrew Everitt | ||||
Anil K. Vijendran | Anil K. Vijendran | ||||
Anli Shundi | Anli Shundi | ||||
Anthony Goubard | |||||
Anthony Green | Anthony Green | ||||
Antoine Levy-Lambert | Antoine Levy-Lambert | ||||
Anton Mazkovoi | Anton Mazkovoi | ||||
@@ -218,6 +218,10 @@ Fixed bugs: | |||||
* <unzip> and <untar> now correctly merge multiple nested patternsets. | * <unzip> and <untar> now correctly merge multiple nested patternsets. | ||||
Bugzilla Report 38973. | Bugzilla Report 38973. | ||||
* On case-insensitive filesystems, a <move> to change filename case | |||||
erroneously deleted the "destination" file before attempting to rename | |||||
the source file. Bugzilla 37701. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
* took in bugzilla report 39320. | * took in bugzilla report 39320. | ||||
@@ -1,5 +1,5 @@ | |||||
/* | /* | ||||
* Copyright 2000-2005 The Apache Software Foundation | |||||
* Copyright 2000-2006 The Apache Software Foundation | |||||
* | * | ||||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
@@ -373,7 +373,8 @@ public class Move extends Copy { | |||||
if (parent != null && !parent.exists()) { | if (parent != null && !parent.exists()) { | ||||
parent.mkdirs(); | parent.mkdirs(); | ||||
} | } | ||||
if (destFile.isFile() && !destFile.delete()) { | |||||
if (destFile.isFile() && !destFile.equals(sourceFile) | |||||
&& !destFile.delete()) { | |||||
throw new BuildException("Unable to remove existing " | throw new BuildException("Unable to remove existing " | ||||
+ "file " + destFile); | + "file " + destFile); | ||||
} | } | ||||