FELIX-370: windows fixes from clement, verified as still working on linux

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@579976 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
index c6619f5..cd32cb8 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/OBRInstall.java
@@ -81,7 +81,8 @@
 
         String localRepoPath = localRepository.getBasedir();
         String artifactPath = localRepository.pathOf( project.getArtifact() );
-        String bundlePath = localRepoPath + File.separatorChar + artifactPath;
+        String bundlePath = localRepoPath + File.separator + artifactPath;
+        bundlePath = bundlePath.replace( '\\', '/' );
 
         PathFile repositoryXml = normalizeRepositoryPath( obrRepository, localRepoPath );
         String extensionXml = findOBRExtensions( project.getResources() );
diff --git a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java
index ec2f890..433b6d5 100644
--- a/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java
+++ b/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java
@@ -145,17 +145,17 @@
     }

 

     /**

-     * get only the name from the filname.

+     * get only the name from the filename.

      * @param fullFilename full filename

      * @return the name of the file or folder

      */

     private String extractFileName(String fullFilename) {

-        int index = fullFilename.lastIndexOf(File.separator);

+        int index = fullFilename.lastIndexOf('/'); // Given path 

         return fullFilename.substring(index + 1, fullFilename.length());

     }

 

     /**

-     * get the path form the filename.

+     * get the path from the filename.

      * @param fullFilename full filename

      * @return the path of the file

      */