[
https://issues.apache.org/jira/browse/SSHD-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17680339#comment-17680339
]
Thomas Wolf commented on SSHD-1319:
-----------------------------------
Looks like this was an oversight in commit e85b67e0.
{{SftpOutputStreamAsync.setOffset()}} is not called anywhere... The version
before that did use that position parameter.
This also shows that there is a test missing that would exercise this
{{transferFrom()}} with a non-zero position.
Could you maybe provide a PR for a fix including a test on GitHub?
(BTW: the read loop in {{transferFrom()}} terminates when
{{ReadableByteChannel.read(Buffer) <= 0}}. But zero does not indicate
end-of-stream, only < 0 does.)
> 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: [email protected]
For additional commands, e-mail: [email protected]