mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 17:47:33 -05:00
Propagate file permissions in both directions in Unix pscp and psftp.
I think I have to consider this to be a separate but related change to the wishlist item 'pscp-filemodes'; that was written before the Unix port existed, and referred to the ability to configure the permissions used for files copied from Windows to Unix - which is still not done. [originally from svn r9260]
This commit is contained in:
8
sftp.c
8
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;
|
||||
|
Reference in New Issue
Block a user