From 21ad32c6f64ce646f3d111a88649ce3b4e831e29 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Fri, 25 Aug 2006 11:50:39 +0000 Subject: [PATCH] Fix bug 155188 ssh recursive remote copy of directory trees --- .../org/eclipse/rse/services/ssh/files/SftpFileService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java index bd605991a7f..8020f0068be 100644 --- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java +++ b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/files/SftpFileService.java @@ -743,13 +743,13 @@ public class SftpFileService extends AbstractFileService implements IFileService } public boolean copy(IProgressMonitor monitor, String srcParent, String srcName, String tgtParent, String tgtName) throws SystemMessageException { - // move is not supported by sftp directly. Use the ssh shell instead. - // TODO check if newer versions of sftp support move directly + // copy is not supported by sftp directly. Use the ssh shell instead. + // TODO check if newer versions of sftp support copy directly // TODO Interpret some error messages like "command not found" (use (x)copy instead of cp on windows) Activator.trace("SftpFileService.copy "+srcName); //$NON-NLS-1$ String fullPathOld = enQuote(srcParent + '/' + srcName); String fullPathNew = enQuote(tgtParent + '/' + tgtName); - int rv = runCommand(monitor, "cp "+fullPathOld+' '+fullPathNew); //$NON-NLS-1$ + int rv = runCommand(monitor, "cp -Rp "+fullPathOld+' '+fullPathNew); //$NON-NLS-1$ return (rv==0); }