Browse Source

normalize file names when importing files with absolute paths

this is the root cause of Bugzilla Issue 58886
master
Stefan Bodewig 9 years ago
parent
commit
7046631e9a
2 changed files with 6 additions and 1 deletions
  1. +5
    -0
      WHATSNEW
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/ImportTask.java

+ 5
- 0
WHATSNEW View File

@@ -33,6 +33,11 @@ Fixed bugs:
* <script> could fail to find javax.script on JDK9 with Jigsaw. * <script> could fail to find javax.script on JDK9 with Jigsaw.
Bugzilla Report 58271 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: Other changes:
-------------- --------------




+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/ImportTask.java View File

@@ -241,7 +241,7 @@ public class ImportTask extends Task {


if (file != null) { if (file != null) {
if (isExistingAbsoluteFile(file)) { if (isExistingAbsoluteFile(file)) {
return new FileResource(new File(file));
return new FileResource(FILE_UTILS.normalize(file));
} }


File buildFile = File buildFile =


Loading…
Cancel
Save