diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 009bb30bc..f019bb923 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -138,6 +138,7 @@ Glenn Twiggs Greg Nelson Greg Roodt Greg Schueler +Grégoire Vatry Günther Kögel Harish Prabandham Haroon Rafique diff --git a/WHATSNEW b/WHATSNEW index 370ce7956..3dc0e0908 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -21,6 +21,10 @@ Fixed bugs: where another thread already created the same directory. Bugzilla Report 55290 + * created '/' rather than './' for the parent + directory of the given jarfile. + Bugzilla Report 55049 + Other changes: -------------- diff --git a/contributors.xml b/contributors.xml index e3a1bcee2..ffb452b43 100644 --- a/contributors.xml +++ b/contributors.xml @@ -576,6 +576,10 @@ Greg Schueler + + Grégoire + Vatry + Günther Kögel diff --git a/src/main/org/apache/tools/ant/taskdefs/ManifestClassPath.java b/src/main/org/apache/tools/ant/taskdefs/ManifestClassPath.java index 497c0a195..84c21c1e4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ManifestClassPath.java +++ b/src/main/org/apache/tools/ant/taskdefs/ManifestClassPath.java @@ -87,7 +87,11 @@ public class ManifestClassPath extends Task { String relPath = null; String canonicalPath = null; try { - relPath = FileUtils.getRelativePath(dir, pathEntry); + if (dir.equals(pathEntry)) { + relPath = "."; + } else { + relPath = FileUtils.getRelativePath(dir, pathEntry); + } canonicalPath = pathEntry.getCanonicalPath(); // getRelativePath always uses '/' as separator, adapt diff --git a/src/tests/antunit/taskdefs/manifestclasspath-test.xml b/src/tests/antunit/taskdefs/manifestclasspath-test.xml new file mode 100644 index 000000000..612990b61 --- /dev/null +++ b/src/tests/antunit/taskdefs/manifestclasspath-test.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + +