maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r190064 - in /maven/wagon/trunk/wagon-providers/wagon-ssh: pom.xml src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
Date Sat, 11 Jun 2005 02:47:52 GMT
Author: brett
Date: Fri Jun 10 19:47:52 2005
New Revision: 190064

URL: http://svn.apache.org/viewcvs?rev=190064&view=rev
Log:
PR: MPARTIFACT-53
Fix directory creation for the SFTP provider

Modified:
    maven/wagon/trunk/wagon-providers/wagon-ssh/pom.xml
    maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh/pom.xml
URL: http://svn.apache.org/viewcvs/maven/wagon/trunk/wagon-providers/wagon-ssh/pom.xml?rev=190064&r1=190063&r2=190064&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh/pom.xml (original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh/pom.xml Fri Jun 10 19:47:52 2005
@@ -8,6 +8,7 @@
     <version>1.0-alpha-4-SNAPSHOT</version>
   </parent>
   <artifactId>wagon-ssh</artifactId>
+  <version>1.0-alpha-4-SNAPSHOT</version>
   <name>Maven Wagon SSH Provider</name>
   <dependencies>
     <dependency>

Modified: maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
URL: http://svn.apache.org/viewcvs/maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java?rev=190064&r1=190063&r2=190064&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/SftpWagon.java
Fri Jun 10 19:47:52 2005
@@ -83,7 +83,7 @@
 
             channel.cd( basedir );
 
-            mkdirs( channel, dir );
+            mkdirs( channel, resourceName );
 
             firePutStarted( resource, source );
 
@@ -152,10 +152,10 @@
         }
     }
 
-    private void mkdirs( ChannelSftp channel, String dir )
+    private void mkdirs( ChannelSftp channel, String resourceName )
         throws TransferFailedException, SftpException
     {
-        String[] dirs = PathUtils.dirnames( dir );
+        String[] dirs = PathUtils.dirnames( resourceName );
         for ( int i = 0; i < dirs.length; i++ )
         {
             try
@@ -163,7 +163,7 @@
                 SftpATTRS attrs = channel.stat( dirs[i] );
                 if ( ( attrs.getPermissions() & S_IFDIR ) == 0 )
                 {
-                    throw new TransferFailedException( "Remote path is not a directory:"
+ dir );
+                    throw new TransferFailedException( "Remote path is not a directory:"
+ PathUtils.dirname( resourceName ) );
                 }
             }
             catch ( SftpException e )



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


Mime
View raw message