mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -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:
@ -88,7 +88,8 @@ struct RFile {
|
||||
};
|
||||
|
||||
RFile *open_existing_file(char *name, uint64 *size,
|
||||
unsigned long *mtime, unsigned long *atime)
|
||||
unsigned long *mtime, unsigned long *atime,
|
||||
long *perms)
|
||||
{
|
||||
HANDLE h;
|
||||
RFile *ret;
|
||||
@ -113,6 +114,9 @@ RFile *open_existing_file(char *name, uint64 *size,
|
||||
TIME_WIN_TO_POSIX(wrtime, *mtime);
|
||||
}
|
||||
|
||||
if (perms)
|
||||
*perms = -1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -137,7 +141,7 @@ struct WFile {
|
||||
HANDLE h;
|
||||
};
|
||||
|
||||
WFile *open_new_file(char *name)
|
||||
WFile *open_new_file(char *name, long perms)
|
||||
{
|
||||
HANDLE h;
|
||||
WFile *ret;
|
||||
|
Reference in New Issue
Block a user