diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-08-03 22:21:43 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-08-03 22:21:43 +0200 |
commit | 15ebbad146d980a33cd14e9fe4d99b4a7f69a46b (patch) | |
tree | 978970e4491c2b3b40bac51c8db08f8b92dc849d /examples | |
parent | 790b62bca59f46593711d17dd6c3058c7571a17c (diff) | |
download | libssh-15ebbad146d980a33cd14e9fe4d99b4a7f69a46b.tar.gz libssh-15ebbad146d980a33cd14e9fe4d99b4a7f69a46b.tar.xz libssh-15ebbad146d980a33cd14e9fe4d99b4a7f69a46b.zip |
examples: Fix permissions of the file we copy.
Thanks to Baptiste Marchand.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/libssh_scp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/libssh_scp.c b/examples/libssh_scp.c index c3dc1d6..5e3ba61 100644 --- a/examples/libssh_scp.c +++ b/examples/libssh_scp.c @@ -182,7 +182,7 @@ static int do_copy(struct location *src, struct location *dest, int recursive){ fd=fileno(src->file); fstat(fd,&s); size=s.st_size; - mode = s.st_mode & S_IFMT; + mode = s.st_mode & ~S_IFMT; filename=ssh_basename(src->path); } else { size=0; |