[ 
https://issues.apache.org/jira/browse/SSHD-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Wolf resolved SSHD-1228.
-------------------------------
    Fix Version/s: 2.7.1
         Assignee: Thomas Wolf
       Resolution: Fixed

Thanks, Samuel!

> 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
>            Assignee: Thomas Wolf
>            Priority: Minor
>             Fix For: 2.7.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to