Author: mcculls
Date: Mon Nov 19 02:39:51 2007
New Revision: 596259

URL: http://svn.apache.org/viewvc?rev=596259&view=rev
Log:
FELIX-423: fix OBR PathFile to encode spaces on all platforms, not just Windows 
and return absolute path when the basedir is not related to the file (instead 
of returning null which gets appended to various strings without checking)

Modified:
    
felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java

Modified: 
felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java?rev=596259&r1=596258&r2=596259&view=diff
==============================================================================
--- 
felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java
 (original)
+++ 
felix/trunk/maven-obr-plugin/src/main/java/org/apache/felix/sandbox/obr/plugin/PathFile.java
 Mon Nov 19 02:39:51 2007
@@ -256,9 +256,10 @@
         String path = PathFile.uniformSeparator(getAbsoluteFilename());
         if (File.separatorChar == '\\') { 
                path = path.replace('\\', '/');
-               path = path.replaceAll(" ", "%20");
         }
 
+        path = path.replaceAll(" ", "%20");
+
         URI uri = null;
         try {
             uri = new URI(path);
@@ -300,7 +301,7 @@
                     return "." + File.separator + 
m_pathFile.substring(m_baseDir.length());
                 }
             }
-            return null;
+            return m_pathFile;
         }
     }
 


Reply via email to