You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Samuel Padou (Jira)" <ji...@apache.org> on 2021/11/22 12:05:00 UTC
[jira] [Created] (SSHD-1228) Wrong creationTime in writeAttrs for SFTP
Samuel Padou created SSHD-1228:
----------------------------------
Summary: 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
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-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org