This is an automated email from the ASF dual-hosted git repository. lgoldstein pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mina-sshd.git
commit 11c0049c5376ea3bdf6dc480b4132470139f01fe Author: Lyor Goldstein <lgoldst...@apache.org> AuthorDate: Fri Mar 5 10:59:03 2021 +0200 Fixed SftpCommandMain handling of 'put' command in case of single argument provided --- sshd-cli/src/main/java/org/apache/sshd/cli/client/SftpCommandMain.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshd-cli/src/main/java/org/apache/sshd/cli/client/SftpCommandMain.java b/sshd-cli/src/main/java/org/apache/sshd/cli/client/SftpCommandMain.java index 79cbc57..aa23166 100644 --- a/sshd-cli/src/main/java/org/apache/sshd/cli/client/SftpCommandMain.java +++ b/sshd-cli/src/main/java/org/apache/sshd/cli/client/SftpCommandMain.java @@ -1123,7 +1123,7 @@ public class SftpCommandMain extends SshClientCliSupport implements Channel { String remotePath; if (upload) { localPath = src; - remotePath = ValidateUtils.checkNotNullAndNotEmpty(tgt, "No remote target specified: %s", args); + remotePath = GenericUtils.isEmpty(tgt) ? src : tgt; } else { localPath = GenericUtils.isEmpty(tgt) ? getCurrentLocalDirectory() : tgt; remotePath = src;