--- src/main/java/hudson/plugins/sshslaves/SSHLauncher.java.orig Sun Jul 18 21:03:28 2010 +++ src/main/java/hudson/plugins/sshslaves/SSHLauncher.java Sun Jul 18 20:53:48 2010 @@ -586,7 +586,16 @@ sftpClient = new SFTPv3Client(connection); sftpClient.rm(fileName); } catch (Exception e) { - e.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); + if (sftpClient == null) { + /* system without SFTP */ + try { + connection.exec("rm " + fileName, new NullStream()); + } catch (Exception e2) { + e2.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); + } + } else { + e.printStackTrace(listener.error(Messages.SSHLauncher_ErrorDeletingFile(getTimestamp()))); + } } finally { if (sftpClient != null) { sftpClient.close();