[Twisted-Python] Couple of conch bug-fixes

Hi, I've been using the Twisted SSH server and client code and found a couple of bugs in the SFTP code: In 'twisted/conch/ssh/filetransfer.py': FILEXFER_ATTR_ACMODTIME 0x00000009 should be replaced by this: FILEXFER_ATTR_ACMODTIME 0x00000008 According to this document anyway: http://tools.ietf.org/html/draft-ietf-secsh-filexfer-02#section-5 This makes the 'preserve timestamp' option in WinSCP3 work. In 'twisted/conch/scripts/cftp.py': d = self.client.openFile(remote, filetransfer.FXF_WRITE|filetransfer.FXF_CREAT, {}) should be replaced, in *both* places, by something like this: flags = filetransfer.FXF_WRITE|filetransfer.FXF_CREAT|filetransfer.FXF_TRUNC d = self.client.openFile(remote, flags, {}) This makes file tranfer work when an *existing* file is being over-written by a *smaller* file. It took me a while to find this one :-) Hope this is a suitable place for these minor fixes, regards, John.

On Sun, 2007-03-11 at 15:51 +0000, John Popplewell wrote:
Could you please add them to our issue tracker (http://twistedmatrix.com) so they don't get lost? Thanks!

On Sun, Mar 11, 2007 at 10:34:28PM -0400, Itamar Shtull-Trauring wrote:

On Sun, 2007-03-11 at 15:51 +0000, John Popplewell wrote:
Could you please add them to our issue tracker (http://twistedmatrix.com) so they don't get lost? Thanks!

On Sun, Mar 11, 2007 at 10:34:28PM -0400, Itamar Shtull-Trauring wrote:
participants (3)
-
Itamar Shtull-Trauring
-
Jean-Paul Calderone
-
John Popplewell