X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.lib.sshd%2Fsrc%2Forg%2Fargeo%2Fcms%2Fssh%2FSshSync.java;h=31e63411ad3333202e5b09ea495ace0301ec496a;hb=54df376a9c2dd458a82eaa09bfbb718fe699dd0d;hp=71b6365761f7ee5a7752747f554d230a1b5b69fc;hpb=4e548693acc16f97b74eaaa95d6841054a172b85;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.lib.sshd/src/org/argeo/cms/ssh/SshSync.java b/org.argeo.cms.lib.sshd/src/org/argeo/cms/ssh/SshSync.java index 71b636576..31e63411a 100644 --- a/org.argeo.cms.lib.sshd/src/org/argeo/cms/ssh/SshSync.java +++ b/org.argeo.cms.lib.sshd/src/org/argeo/cms/ssh/SshSync.java @@ -11,7 +11,6 @@ import java.security.KeyPair; import java.util.Map; import java.util.Scanner; -import org.apache.commons.io.IOUtils; import org.apache.sshd.agent.SshAgent; import org.apache.sshd.agent.SshAgentFactory; import org.apache.sshd.agent.local.LocalAgentFactory; @@ -25,6 +24,7 @@ import org.apache.sshd.common.config.keys.FilePasswordProvider; import org.apache.sshd.sftp.client.fs.SftpFileSystem; import org.apache.sshd.sftp.client.fs.SftpFileSystemProvider; import org.argeo.api.cms.CmsLog; +import org.argeo.cms.util.StreamUtils; public class SshSync { private final static CmsLog log = CmsLog.getLog(SshSync.class); @@ -124,7 +124,7 @@ public class SshSync { log.debug("Relative copied file " + relativeCopiedFile); try (OutputStream out = Files.newOutputStream(copiedFile); InputStream in = Files.newInputStream(testPath)) { - IOUtils.copy(in, out); + StreamUtils.copy(in, out); } log.debug("Copied " + testPath + " to " + copiedFile); Files.delete(testPath);