HDFS-9609. libhdfs++: Allow seek to EOF. Contributed by Bob Hansen
This commit is contained in:
parent
7d8452040d
commit
e376c022f4
|
@ -120,7 +120,7 @@ Status FileHandleImpl::Seek(off_t *offset, std::ios_base::seekdir whence) {
|
||||||
bool FileHandleImpl::CheckSeekBounds(ssize_t desired_position) {
|
bool FileHandleImpl::CheckSeekBounds(ssize_t desired_position) {
|
||||||
ssize_t file_length = file_info_->file_length_;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue