From: david-sarah Date: Thu, 17 Jun 2010 03:37:44 +0000 (-0700) Subject: SFTP: get 'ctime' attribute from 'tahoe:linkmotime'. X-Git-Tag: trac-4500~12 X-Git-Url: https://git.rkrishnan.org/vdrive/install-details.html?a=commitdiff_plain;h=c1412c8a81aa395dd980bce1ee8ea9ceec32c1ec;p=tahoe-lafs%2Ftahoe-lafs.git SFTP: get 'ctime' attribute from 'tahoe:linkmotime'. --- 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,