Community
Participate
Working Groups
Despite what org.eclipse.ptp.remotetools.core.IRemoteFileTools.removeDirectory documentation says it seems now the remove directory action deletes only empty directory (like a Unix rmdir does). It used to satisfy the documentation contract according to me but now trying to do so on a non-empty directory creates next exception. org.eclipse.ptp.remotetools.exception.RemoteOperationException: 4: Failure at org.eclipse.ptp.remotetools.internal.ssh.FileTools.removeDirectory(FileTools.java:827) at org.eclipse.ptp.remote.remotetools.core.RemoteToolsFileStore.delete(RemoteToolsFileStore.java:149) at ... Caused by: 4: Failure at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289) at com.jcraft.jsch.ChannelSftp.rmdir(ChannelSftp.java:1668) at org.eclipse.ptp.remotetools.internal.ssh.FileTools$8.call(FileTools.java:819) at org.eclipse.ptp.remotetools.internal.ssh.FileTools$8.call(FileTools.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) Keeping such previous behavior is important in order to satisfy the contract of IFileStore.delete method. PS: Such issue is seen on PTP 4, PTP 3.0.x with Eclipse Galileo and Helios.
I've checked in a fix to 3.0 and HEAD. Please see if it fixes you problem.
(In reply to comment #1) > I've checked in a fix to 3.0 and HEAD. Please see if it fixes you problem. Sorry. This was indeed wrong. sftp rmdir is not recursive.
Closing. Please reopen if there is a problem.
Works for me. Thanks.