aboutsummaryrefslogtreecommitdiff
path: root/libssh/sftp.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2008-10-20 16:14:35 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2008-10-20 16:14:35 +0000
commitd9832d1190ee23bf7a7522a8f3d147b505adf2c5 (patch)
treece7150b3e4298dc09ecdfc4c9bd9338f7f6a6e9e /libssh/sftp.c
parentd477025000c4d6717f9501cc8d382eed06fbe868 (diff)
downloadlibssh-d9832d1190ee23bf7a7522a8f3d147b505adf2c5.tar.gz
libssh-d9832d1190ee23bf7a7522a8f3d147b505adf2c5.tar.xz
libssh-d9832d1190ee23bf7a7522a8f3d147b505adf2c5.zip
correct O_RDONLY sftp bug with windows systems
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@181 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/sftp.c')
-rw-r--r--libssh/sftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c
index e0eb14d6..bdb966d9 100644
--- a/libssh/sftp.c
+++ b/libssh/sftp.c
@@ -845,8 +845,8 @@ SFTP_FILE *sftp_open(SFTP_SESSION *sftp, char *file, int access, SFTP_ATTRIBUTES
u32 id=sftp_get_new_id(sftp);
BUFFER *buffer=buffer_new();
STRING *filename;
- if(access & O_RDONLY)
- flags|=SSH_FXF_READ;
+ if(access == O_RDONLY)
+ flags|=SSH_FXF_READ; // if any of the other flag is set, READ should not be set initialy
if(access & O_WRONLY)
flags |= SSH_FXF_WRITE;
if(access & O_RDWR)