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

Thomas Wolf commented on SSHD-1319:
-----------------------------------

Actually that <= 0 condition is fine for {{transferFrom()}}. That method 
returns the number of bytes written, and it provides no way of knowing whether 
end-of-stream has been reached. One needs to know the expected number of bytes 
to be transferred up front, and loop until that many bytes have been 
transferred. So that bit is probably OK as is.


> SftpRemotePathChannel.transferFrom(...) ignores position argument
> -----------------------------------------------------------------
>
>                 Key: SSHD-1319
>                 URL: https://issues.apache.org/jira/browse/SSHD-1319
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.9.2
>            Reporter: Andreas Bergander
>            Priority: Major
>
> The _position_ argument in the _SftpRemotePathChannel.transferFrom(...)_ 
> method seems only to be used when validating it and in debug logging.
> It should also affect where the data is written to the remote file. Perhaps 
> it could be fixed with adding a call to 
> {_}SftpOutputStreamAsync.setOffset(...){_}?
> {code:java}
> output.setOffset(position);{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to