maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1174158 - in /maven/wagon/trunk/wagon-providers: wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
Date Thu, 22 Sep 2011 14:26:28 GMT
Author: olamy
Date: Thu Sep 22 14:26:28 2011
New Revision: 1174158

URL: http://svn.apache.org/viewvc?rev=1174158&view=rev
Log:
avoid extra / to be added

Modified:
    maven/wagon/trunk/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
    maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java?rev=1174158&r1=1174157&r2=1174158&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-shared4/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
Thu Sep 22 14:26:28 2011
@@ -499,7 +499,11 @@ public abstract class AbstractHttpClient
         {
             // TODO: Fix encoding...
             // url += "/" + URLEncoder.encode( parts[i], System.getProperty("file.encoding")
);
-            url.append( '/' ).append( URLEncoder.encode( part ) );
+            if (!url.toString().endsWith( "/" ))
+            {
+                url.append( '/' );
+            }
+            url.append( URLEncoder.encode( part ) );
         }
 
         //Parent directories need to be created before posting

Modified: maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java?rev=1174158&r1=1174157&r2=1174158&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
Thu Sep 22 14:26:28 2011
@@ -232,7 +232,8 @@ public class WebDavWagon
     public List<String> getFileList( String destinationDirectory )
         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
     {
-        String url = getRepository().getUrl() + '/' + destinationDirectory;
+        String repositoryUrl = repository.getUrl();
+        String url = ( repositoryUrl.endsWith( "/" ) ? "" : "/" ) + destinationDirectory;
 
         PropFindMethod method = null;
         try



Mime
View raw message