You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2011/02/02 22:35:52 UTC

svn commit: r1066637 - /myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java

Author: bommel
Date: Wed Feb  2 21:35:52 2011
New Revision: 1066637

URL: http://svn.apache.org/viewvc?rev=1066637&view=rev
Log:
(TOBAGO-964) Bug in resource handling for JBoss 5.0.0 vfszip protocol on Windows
thanks to Helmut Swaczinna

Modified:
    myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java

Modified: myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java?rev=1066637&r1=1066636&r2=1066637&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java Wed Feb  2 21:35:52 2011
@@ -233,6 +233,10 @@ class ResourceLocator {
         // JBoss 5.0.0 introduced vfszip protocol
         if (protocol.equals("vfszip")) {
           fileName = new File(fileName).getParentFile().getParentFile().getPath();
+          if (File.separatorChar == '\\' && fileName.contains("\\")) {
+            fileName = fileName.replace('\\', '/');
+            LOG.info("Fixed slashes for virtual filesystem protocol on windows system: " + fileName);
+          }
         }
         jarFile = new URL(fileName);
       } catch (MalformedURLException e) {