From 15ebbad146d980a33cd14e9fe4d99b4a7f69a46b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 3 Aug 2011 22:21:43 +0200 Subject: examples: Fix permissions of the file we copy. Thanks to Baptiste Marchand. --- examples/libssh_scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/libssh_scp.c') 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; -- cgit