diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-17 16:47:47 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-17 16:47:47 +0000 |
commit | 6dc75f594d4e10cb2102562a944d5873dea28f7e (patch) | |
tree | 4a4e6b65360ace79f83b93deab60acf08418a450 /sftp-client.c | |
parent | 63015fdb0b6267774cbed10517048c63df587d09 (diff) |
- (bal) Patch for fix FCHMOD reference in ftp-client.c by Tim Rice
<tim@multitalents.net>
Diffstat (limited to 'sftp-client.c')
-rw-r--r-- | sftp-client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sftp-client.c b/sftp-client.c index 760a224e..7c234ce2 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -662,7 +662,11 @@ do_download(int fd_in, int fd_out, char *remote_path, char *local_path, status = do_close(fd_in, fd_out, handle, handle_len); /* Override umask and utimes if asked */ +#ifdef HAVE_FCHMOD if (pflag && fchmod(local_fd, mode) == -1) +#else + if (pflag && chmod(local_path, mode) == -1) +#endif /* HAVE_FCHMOD */ error("Couldn't set mode on \"%s\": %s", local_path, strerror(errno)); if (pflag && (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME)) { |