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

Samuel Padou commented on SSHD-1228:
------------------------------------

Sure, submitted here: https://github.com/apache/mina-sshd/pull/209

> Wrong creationTime in writeAttrs for SFTP
> -----------------------------------------
>
>                 Key: SSHD-1228
>                 URL: https://issues.apache.org/jira/browse/SSHD-1228
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Samuel Padou
>            Priority: Minor
>
> InĀ {{SftpHelper#writeAttrsV4}} the {{lastAccessTime}} is written instead of 
> the {{creationTime}}.
> {code:java}
> if ((flags & SftpConstants.SSH_FILEXFER_ATTR_CREATETIME) != 0) {
>     buffer = writeTime(buffer, version, flags, lastAccessTime);
> }
> {code}
> In my implementation I have a {{creationTime}} but no {{lastAccessTime}} so 
> this cause a NPE (the flag is set because {{creationTime}} is not null but 
> {{lastAccessTime}} is null when trying to write it), but this still write the 
> wrong date even if both are available. Most clients seems to only show the 
> {{lastModifiedTime}} though, so this is probably not very visible in most 
> cases.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to