You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2016/01/24 19:36:25 UTC
ant git commit: normalize file names when importing files with
absolute paths
Repository: ant
Updated Branches:
refs/heads/master 790987e70 -> 7046631e9
normalize file names when importing files with absolute paths
this is the root cause of Bugzilla Issue 58886
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/7046631e
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/7046631e
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/7046631e
Branch: refs/heads/master
Commit: 7046631e9a490e203f61b419a272aed0d428506c
Parents: 790987e
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sun Jan 24 19:35:29 2016 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Jan 24 19:35:29 2016 +0100
----------------------------------------------------------------------
WHATSNEW | 5 +++++
src/main/org/apache/tools/ant/taskdefs/ImportTask.java | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/7046631e/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 0d06316..ccf3548 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -33,6 +33,11 @@ Fixed bugs:
* <script> could fail to find javax.script on JDK9 with Jigsaw.
Bugzilla Report 58271
+ * <import> sometimes failed to normalize file names which could lead
+ to files getting imported twice which in turn could lead to targets
+ getting executed twice.
+ Bugzilla Report 58886
+
Other changes:
--------------
http://git-wip-us.apache.org/repos/asf/ant/blob/7046631e/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/ImportTask.java b/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
index 6b82a36..63adf71 100644
--- a/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/ImportTask.java
@@ -241,7 +241,7 @@ public class ImportTask extends Task {
if (file != null) {
if (isExistingAbsoluteFile(file)) {
- return new FileResource(new File(file));
+ return new FileResource(FILE_UTILS.normalize(file));
}
File buildFile =