SFTP: get 'ctime' attribute from 'tahoe:linkmotime'.
This commit is contained in:
parent
9f5488b2d1
commit
c1412c8a81
|
@ -241,16 +241,13 @@ def _populate_attrs(childnode, metadata, size=None):
|
|||
# We would prefer to omit atime, but SFTP version 3 can only
|
||||
# accept mtime if atime is also set.
|
||||
if 'linkmotime' in metadata.get('tahoe', {}):
|
||||
attrs['mtime'] = attrs['atime'] = _to_sftp_time(metadata['tahoe']['linkmotime'])
|
||||
attrs['ctime'] = attrs['mtime'] = attrs['atime'] = _to_sftp_time(metadata['tahoe']['linkmotime'])
|
||||
elif 'mtime' in metadata:
|
||||
attrs['mtime'] = attrs['atime'] = _to_sftp_time(metadata['mtime'])
|
||||
attrs['ctime'] = attrs['mtime'] = attrs['atime'] = _to_sftp_time(metadata['mtime'])
|
||||
|
||||
if 'linkcrtime' in metadata.get('tahoe', {}):
|
||||
attrs['createtime'] = _to_sftp_time(metadata['tahoe']['linkcrtime'])
|
||||
|
||||
if 'ctime' in metadata:
|
||||
attrs['ctime'] = _to_sftp_time(metadata['ctime'])
|
||||
|
||||
attrs['permissions'] = perms
|
||||
|
||||
# twisted.conch.ssh.filetransfer only implements SFTP version 3,
|
||||
|
|
Loading…
Reference in New Issue