maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject cvs commit: maven-wagon/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh ScpWagon.java
Date Fri, 11 Feb 2005 10:58:30 GMT
evenisse    2005/02/11 02:58:30

  Modified:    wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh
                        ScpWagon.java
  Log:
  The CO644 command shoud not include '/'.
  
  Revision  Changes    Path
  1.12      +11 -2     maven-wagon/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java
  
  Index: ScpWagon.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-providers/wagon-ssh/src/main/java/org/apache/maven/wagon/providers/ssh/ScpWagon.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ScpWagon.java	9 Feb 2005 16:36:08 -0000	1.11
  +++ ScpWagon.java	11 Feb 2005 10:58:30 -0000	1.12
  @@ -279,7 +279,16 @@
               // send "C0644 filesize filename", where filename should not include '/'
               long filesize = source.length();
   
  -            command = "C0644 " + filesize + " " + resourceName;
  +            command = "C0644 " + filesize + " ";
  +
  +            if( resourceName.lastIndexOf( '/' ) > 0 )
  +            {
  +                command += resourceName.substring( resourceName.lastIndexOf( '/' ) + 1
);
  +            }
  +            else
  +            {
  +                command+=resourceName;
  +            }
   
               command += "\n";
   
  
  
  

---------------------------------------------------------------------
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