roku 2004/04/08 06:03:50
Modified: src/blocks/webdav/java/org/apache/cocoon/components/webdav WebDAVUtil.java Log: Fixed a small bug in makePath(String path) It was not possible to create collection hirachies with i.e. pattern: 200x/x/y where x is a character or digit. indexOf chooses the first occurance of x, thus I changed a line to lastIndexOf. Revision Changes Path 1.5 +1 -1 cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVUtil.java Index: WebDAVUtil.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/webdav/WebDAVUtil.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WebDAVUtil.java 5 Apr 2004 11:27:38 -0000 1.4 +++ WebDAVUtil.java 8 Apr 2004 13:03:50 -0000 1.5 @@ -170,7 +170,7 @@ String colToMake = null; while (pathToMake.indexOf("/") != -1) { colToMake = pathToMake.substring(0, pathToMake.indexOf("/")); - WebDAVUtil.makeCollection(path.substring(0, path.indexOf(colToMake)), colToMake); + WebDAVUtil.makeCollection(path.substring(0, path.lastIndexOf(colToMake)), colToMake); pathToMake = pathToMake.substring(pathToMake.indexOf("/")+1); } }