You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by ke...@apache.org on 2009/04/15 21:38:15 UTC

svn commit: r765323 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java

Author: kevan
Date: Wed Apr 15 19:38:15 2009
New Revision: 765323

URL: http://svn.apache.org/viewvc?rev=765323&view=rev
Log:
OPENEJB-1005 fix file separator issue on Windows

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java?rev=765323&r1=765322&r2=765323&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/WebModule.java Wed Apr 15 19:38:15 2009
@@ -51,7 +51,7 @@
     public WebModule(WebApp webApp, String contextRoot, ClassLoader classLoader, String jarLocation, String moduleId) {
         this.webApp = webApp;
         if (contextRoot == null) {
-            contextRoot = jarLocation.substring(jarLocation.lastIndexOf('/'));
+            contextRoot = jarLocation.substring(jarLocation.lastIndexOf(System.getProperty("file.separator")));
             if (contextRoot.endsWith(".unpacked")) {
                 contextRoot = contextRoot.substring(0, contextRoot.length() - ".unpacked".length());
             }