Author: mriou
Date: Fri Aug  8 12:53:05 2008
New Revision: 684068

URL: http://svn.apache.org/viewvc?rev=684068&view=rev
Log:
Fixes a few path related glitches for windows users.

Modified:
    
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java

Modified: 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java?rev=684068&r1=684067&r2=684068&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/service/DeploymentBrowser.java
 Fri Aug  8 12:53:05 2008
@@ -124,7 +124,8 @@
                                 if (processes != null) {
                                     List<File> files = 
_store.getProcessConfiguration(processes.get(0)).getFiles();
                                     for (File file : files) {
-                                        String relativePath = 
file.getPath().substring(_store.getDeployDir().getCanonicalPath().length() + 1);
+                                        String relativePath = 
file.getPath().substring(file.getPath()
+                                            
.indexOf("processes")+10).replaceAll("\\\\", "/");
                                         out.write("<p><a href=\"" + 
relativePath + "\">" + relativePath + "</a></p>");
                                     }
                                 } else {
@@ -193,8 +194,9 @@
         if (docFile.indexOf("processes") >= 0) docFile = 
docFile.substring(docFile.indexOf("processes")+10);
         List<File> files = 
FileUtils.listFilesRecursively(_store.getDeployDir(), null);
         for (final File bundleFile : files) {
-            if (bundleFile.getPath().endsWith(docFile))
-                return "/deployment/bundles/" + 
bundleFile.getPath().substring(_store.getDeployDir().getPath().length() + 1);
+            if (bundleFile.getPath().replaceAll("\\\\", "/").endsWith(docFile))
+                return "/deployment/bundles/" + bundleFile.getPath()
+                  .substring(_store.getDeployDir().getPath().length() + 
1).replaceAll("\\\\", "/");
         }
         return null;
     }


Reply via email to