diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-05-26 11:22:11 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-05-26 11:22:11 +0200 |
commit | c483418b8210bc47a765f6b0e0dc99aec63e80fd (patch) | |
tree | 3cacde1d103d95b2bf667abc63a48d695fc6c033 /src | |
parent | ba03388031530fcf49b2c37ce0da801254e5075f (diff) | |
download | libssh-c483418b8210bc47a765f6b0e0dc99aec63e80fd.tar.gz libssh-c483418b8210bc47a765f6b0e0dc99aec63e80fd.tar.xz libssh-c483418b8210bc47a765f6b0e0dc99aec63e80fd.zip |
sftp: Reset eof on seek operations.
This fixes bug #48.
Diffstat (limited to 'src')
-rw-r--r-- | src/sftp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2054,6 +2054,7 @@ int sftp_seek(sftp_file file, uint32_t new_offset) { } file->offset = new_offset; + file->eof = 0; return 0; } @@ -2064,6 +2065,7 @@ int sftp_seek64(sftp_file file, uint64_t new_offset) { } file->offset = new_offset; + file->eof = 0; return 0; } @@ -2080,6 +2082,7 @@ uint64_t sftp_tell64(sftp_file file) { /* Rewinds the position of the file pointer to the beginning of the file.*/ void sftp_rewind(sftp_file file) { file->offset = 0; + file->eof = 0; } /* code written by Nick */ |