Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Neither option -t or -f handles wildcards.
1) Option f: Copying from the server to the client might be ok, since we can just refuse to work with wildcards
2) Option t: Copying from client to server on the form scp filepattern* server.with.mina.sshd:/ just makes ScpCommand crash, since SSHD can't handle multiple input lines, when the scp client expands the wildcards.
Furthermore, the SCPCommand should handle warnings and failures sent from the client, which it currently doesn't do.
Propsed very ugly fix for 2) and the failure/warning problem
if (optT) {
ack();
for (; {
String line;
boolean isDir = false;
char c = readAck();
switch (c)
if (optR && isDir)
{ writeDir(line, root); }else
{ writeFile(line, root); }
}
}
And replacing readAck with something like:
private char readAck() throws IOException {
int c = in.read();
switch (c)
return (char)c;
}
Proposed fix for 1): use some wildcard matcher on the local file system. I have one, but it's proprietary so I can't submit it here.