X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sftp.c;h=793f72ab1f9e74100f868c21a452fd2c8c0ff6b5;hb=5c00b581c8b83f6e7be9d53a77d9c61ef4d817a5;hp=52f278edff04070a76903778331c93b9b2ca8297;hpb=f14953d9e94c176cfc928bb719d6f613da96717e;p=PuTTY.git diff --git a/sftp.c b/sftp.c index 52f278ed..793f72ab 100644 --- a/sftp.c +++ b/sftp.c @@ -548,7 +548,8 @@ char *fxp_realpath_recv(struct sftp_packet *pktin, struct sftp_request *req) /* * Open a file. */ -struct sftp_request *fxp_open_send(char *path, int type) +struct sftp_request *fxp_open_send(char *path, int type, + struct fxp_attrs *attrs) { struct sftp_request *req = sftp_alloc_request(); struct sftp_packet *pktout; @@ -557,7 +558,10 @@ struct sftp_request *fxp_open_send(char *path, int type) sftp_pkt_adduint32(pktout, req->id); sftp_pkt_addstring(pktout, path); sftp_pkt_adduint32(pktout, type); - sftp_pkt_adduint32(pktout, 0); /* (FIXME) empty ATTRS structure */ + if (attrs) + sftp_pkt_addattrs(pktout, *attrs); + else + sftp_pkt_adduint32(pktout, 0); /* empty ATTRS structure */ sftp_send(pktout); return req;