mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
Fix bug 155188 ssh recursive remote copy of directory trees
This commit is contained in:
parent
10bed6d007
commit
21ad32c6f6
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue