commit | 972f8f0685bcbdf4228c2717b2596b68cbca58ec | [log] [tgz] |
---|---|---|
author | Stuart McCulloch <mcculls@apache.org> | Fri Oct 19 03:09:43 2007 +0000 |
committer | Stuart McCulloch <mcculls@apache.org> | Fri Oct 19 03:09:43 2007 +0000 |
tree | 0f5f1a01c3adfc41fceb2d0f0974f8d4037316cb | |
parent | 4d18a85434d547f7aef08f2b376cef8da949c102 [diff] |
FELIX-400: apply Carlos' patch to fix array out of bounds exception when the resource directory is the same as the basedir git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@586243 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java index 56f4a29..b2f7d35 100644 --- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java +++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -595,7 +595,14 @@ // make relative to basedir if (path.startsWith(basePath)) { - path = path.substring(basePath.length() + 1); + if ( path.length() == basePath.length() ) + { + path = "."; + } + else + { + path = path.substring( basePath.length() + 1 ); + } } // replace windows backslash with a slash // this is a workaround for a problem with bnd 0.0.189