joerg       2004/02/07 04:43:24

  Modified:    src/java/org/apache/cocoon/components/modules/input
                        RealPathModule.java
  Log:
  fixing issue with trailing slash:
  http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107033352113597&w=4
  http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107046347009318&w=4
  now it's aways removed and so consistent
  
  Revision  Changes    Path
  1.2       +5 -1      
cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/RealPathModule.java
  
  Index: RealPathModule.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/modules/input/RealPathModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RealPathModule.java       27 Mar 2003 03:43:01 -0000      1.1
  +++ RealPathModule.java       7 Feb 2004 12:43:24 -0000       1.2
  @@ -104,6 +104,10 @@
       public Object getAttribute( String name, Configuration modeConf, Map 
objectModel ) throws ConfigurationException {
   
           String uri = 
ObjectModelHelper.getContext(objectModel).getRealPath(name);
  +        int lastCharPos = uri.length() - 1;
  +        if (uri.charAt(lastCharPos) == '\\') {
  +            uri = uri.substring(0, lastCharPos);
  +        }
           return uri;
       }
   
  
  
  

Reply via email to