ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh Scp.java
Date Wed, 27 Aug 2003 09:34:25 GMT
bodewig     2003/08/27 02:34:25

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ssh Scp.java
  Log:
  resolve relative paths in file and todir attributes like all other Ant tasks do - i.e. relative
to basedir
  
  Revision  Changes    Path
  1.7       +7 -7      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
  
  Index: Scp.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Scp.java	9 Jul 2003 12:12:59 -0000	1.6
  +++ Scp.java	27 Aug 2003 09:34:25 -0000	1.7
  @@ -177,10 +177,10 @@
           Session session = null;
           try {
               session = openSession();
  -            ScpFromMessage message = new ScpFromMessage(session,
  -                                                         file,
  -                                                         new File(toPath),
  -                                                         fromSshUri.endsWith("*"));
  +            ScpFromMessage message = 
  +                new ScpFromMessage(session, file, 
  +                                   getProject().resolveFile(toPath),
  +                                   fromSshUri.endsWith("*"));
               log("Receiving file: " + file);
               message.setLogListener(this);
               message.execute();
  @@ -222,9 +222,9 @@
           Session session = null;
           try {
               session = openSession();
  -            ScpToMessage message = new ScpToMessage(session,
  -                                                     new File(fromPath),
  -                                                     file);
  +            ScpToMessage message = 
  +                new ScpToMessage(session, getProject().resolveFile(fromPath),
  +                                 file);
               message.setLogListener(this);
               message.execute();
           } finally {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message