[ 
https://issues.apache.org/jira/browse/SSHD-1106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243259#comment-17243259
 ] 

Lyor Goldstein commented on SSHD-1106:
--------------------------------------

After some more research (see attached) link it seems that there are too many 
special characters and edge cases to handle - not just spaces. At this time, 
the required effort seems to be too big and not really part of SSH/SCP per-se 
but rather related to the O/S. Therefore at this time I think we should place 
the responsibility of taking care of special characters in file name on the 
users rather than the library. The only reservation to this is on the server 
side - where for now it is assumed that the O/S will take care of the 
escape/un-escape - the SCP is in this case just a conduit.

> SCP failed for target filename with space inside
> ------------------------------------------------
>
>                 Key: SSHD-1106
>                 URL: https://issues.apache.org/jira/browse/SSHD-1106
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.5.1
>            Reporter: min yun law
>            Assignee: Lyor Goldstein
>            Priority: Minor
>
> when using ScpClient.upload() and download() API and give the remote file 
> name with space inside, it will throw exception as:
> java.io.EOFException: readAck - EOF before ACK
>  
> Here is sample of code:
> String localDir = "/scratch/downloads/";
>  String fileName = "p201300_Linux-x86-64 (1).zip";
>  String remotePath = "/tmp";
> File localPathFile = new File(localDir, fileName);
>  Path pathFile = localPathFile.toPath();
> //remote is linux 
> String remoteFullPath = remotePath+"/"+fileName;
> Collection<ScpClient.Option> options = EnumSet.noneOf(
>  ScpClient.Option.class);
> scpClient.upload(pathFile,remoteFullPath,option); //it will throw exception 
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to