fix SEEK_END when set_extent()
This commit is contained in:
parent
fb39d6304a
commit
7a3c55af35
@ -178,7 +178,7 @@ void FileBase::seek(off_t off, int whence)
|
||||
if (whence == SEEK_END) {
|
||||
if (off > 0)
|
||||
throwIOException("bad seek 3");
|
||||
off += _length;
|
||||
off += _offset + _length;
|
||||
whence = SEEK_SET;
|
||||
}
|
||||
if (::lseek(_fd,off,whence) < 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user