From c1412c8a81aa395dd980bce1ee8ea9ceec32c1ec Mon Sep 17 00:00:00 2001 From: david-sarah Date: Wed, 16 Jun 2010 20:37:44 -0700 Subject: [PATCH] SFTP: get 'ctime' attribute from 'tahoe:linkmotime'. --- src/allmydata/frontends/sftpd.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/allmydata/frontends/sftpd.py b/src/allmydata/frontends/sftpd.py index aa113690..894af5f2 100644 --- a/src/allmydata/frontends/sftpd.py +++ b/src/allmydata/frontends/sftpd.py @@ -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, -- 2.45.2