cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/modules/input RealPathModule.java
Date Sat, 07 Feb 2004 12:43:24 GMT
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;
       }
   
  
  
  

Mime
View raw message