HDFS-9609. libhdfs++: Allow seek to EOF. Contributed by Bob Hansen

This commit is contained in:
James 2016-01-07 10:48:26 -05:00 committed by James Clampffer
parent 7d8452040d
commit e376c022f4
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ Status FileHandleImpl::Seek(off_t *offset, std::ios_base::seekdir whence) {
bool FileHandleImpl::CheckSeekBounds(ssize_t desired_position) {
ssize_t file_length = file_info_->file_length_;
if (desired_position < 0 || desired_position >= file_length) {
if (desired_position < 0 || desired_position > file_length) {
return false;
}