* Fix send_file() for delete_dest=True case when it is a dir to avoid:
  /usr/bin/ssh -a -x  -o BatchMode=yes -o ConnectTimeout=30 -o
      ServerAliveInterval=300 -l root -p 22 rval20 " rm -rf
      root@rval20:\/tmp/sysinfo/autoserv-4dw490\ && mkdir
      root@rval20:\/tmp/sysinfo/autoserv-4dw490\"

Signed-off-by: JP Abgrall <[email protected]>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3479 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py
index ae93423..4491994 100644
--- a/server/hosts/abstract_ssh.py
+++ b/server/hosts/abstract_ssh.py
@@ -274,7 +274,7 @@
                                   ignore_status=True).exit_status == 0
                 if is_dir:
                     cmd = "rm -rf %s && mkdir %s"
-                    cmd %= (remote_dest, remote_dest)
+                    cmd %= (dest, dest)
                     self.run(cmd)
 
             local_sources = self._make_rsync_compatible_source(source, True)