aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-03 22:21:43 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-03 22:21:43 +0200
commit15ebbad146d980a33cd14e9fe4d99b4a7f69a46b (patch)
tree978970e4491c2b3b40bac51c8db08f8b92dc849d /examples
parent790b62bca59f46593711d17dd6c3058c7571a17c (diff)
downloadlibssh-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/libssh_scp.c b/examples/libssh_scp.c
index c3dc1d62..5e3ba61e 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;