jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r452453 - /jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
Date Tue, 03 Oct 2006 12:32:00 GMT
Author: angela
Date: Tue Oct  3 05:32:00 2006
New Revision: 452453

URL: http://svn.apache.org/viewvc?view=rev&rev=452453
Log:
- handle null prefix
- always remove trailing pathPrefix from href

Modified:
    jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java

Modified: jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java?view=diff&rev=452453&r1=452452&r2=452453
==============================================================================
--- jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
(original)
+++ jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
Tue Oct  3 05:32:00 2006
@@ -96,8 +96,10 @@
                 href = href.substring(prefix.length());
             }
         }
-        if (pathPrefix != null && pathPrefix.length() > 0 && !prefix.endsWith(pathPrefix))
{
-            b.append(pathPrefix);
+        if (pathPrefix != null && pathPrefix.length() > 0) {
+            if (!b.toString().endsWith(pathPrefix)) {
+                b.append(pathPrefix);
+            }
             if (href.startsWith(pathPrefix)) {
                 href = href.substring(pathPrefix.length());
             }



Mime
View raw message