Remove quotes in SCP transfers Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/f3444e0c Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/f3444e0c Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/f3444e0c
Branch: refs/heads/master Commit: f3444e0c876dae83a0113046b4862cdd3fa7ec1c Parents: ec9d260 Author: Guillaume Nodet <[email protected]> Authored: Fri Jul 26 11:49:01 2013 +0200 Committer: Guillaume Nodet <[email protected]> Committed: Fri Jul 26 11:49:01 2013 +0200 ---------------------------------------------------------------------- .../src/main/java/org/apache/sshd/server/command/ScpCommand.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/f3444e0c/sshd-core/src/main/java/org/apache/sshd/server/command/ScpCommand.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/server/command/ScpCommand.java b/sshd-core/src/main/java/org/apache/sshd/server/command/ScpCommand.java index d67715c..be5fc91 100644 --- a/sshd-core/src/main/java/org/apache/sshd/server/command/ScpCommand.java +++ b/sshd-core/src/main/java/org/apache/sshd/server/command/ScpCommand.java @@ -90,6 +90,9 @@ public class ScpCommand implements Command, Runnable, FileSystemAware { } } else { path = command.substring(command.indexOf(args[i-1]) + args[i-1].length() + 1); + if (path.startsWith("\"") && path.endsWith("\"") || path.startsWith("'") && path.endsWith("'")) { + path = path.substring(1, path.length() - 1); + } break; } }
