maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r417272 - /maven/wagon/trunk/wagon-providers/wagon-webdav/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
Date Mon, 26 Jun 2006 18:28:46 GMT
Author: carlos
Date: Mon Jun 26 11:28:46 2006
New Revision: 417272

URL: http://svn.apache.org/viewvc?rev=417272&view=rev
Log:
Append / when creating directories

Modified:
    maven/wagon/trunk/wagon-providers/wagon-webdav/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-webdav/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-webdav/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java?rev=417272&r1=417271&r2=417272&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-webdav/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-webdav/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
Mon Jun 26 11:28:46 2006
@@ -232,12 +232,12 @@
                 try
                 {
                     String[] dirs = relpath.split( "/" );
-                    String createDir = "";
+                    String createDir = "/";
 
                     // start at 1 because first element of dirs[] from split() is ""
                     for ( int count = 1; count < dirs.length; count++ )
                     {
-                        createDir = createDir + "/" + dirs[count];
+                        createDir = createDir + dirs[count] + "/";
                         webdavResource.mkcolMethod( createDir );
                     }
                     webdavResource.setPath( oldpath );
@@ -515,7 +515,7 @@
     public void putDirectory( File sourceDirectory, String destinationDirectory ) 
         throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
     {
-        String createPath = repository.getBasedir() + "/" + destinationDirectory;
+        String createPath = repository.getBasedir() + "/" + destinationDirectory + "/";
 
         try
         {
@@ -547,12 +547,12 @@
             }
             else
             {
-                String target = createPath + "/" + listFiles[i].getName();
+                String target = createPath + listFiles[i].getName();
 
                 try
                 {
                     webdavResource.putMethod( target, listFiles[i] );
-                }
+                    }
                 catch ( IOException e )
                 {
                     throw new TransferFailedException( "Failed to upload to remote repository:
" + target + " : "



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message