Author: mcculls
Date: Thu Oct 18 20:09:43 2007
New Revision: 586243

URL: http://svn.apache.org/viewvc?rev=586243&view=rev
Log:
FELIX-400: apply Carlos' patch to fix array out of bounds exception when the 
resource directory is the same as the basedir

Modified:
    
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Modified: 
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=586243&r1=586242&r2=586243&view=diff
==============================================================================
--- 
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
 (original)
+++ 
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
 Thu Oct 18 20:09:43 2007
@@ -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


Reply via email to