fix SEEK_END when set_extent()

This commit is contained in:
John Reiser 2007-02-07 21:21:19 -08:00
parent fb39d6304a
commit 7a3c55af35

View File

@ -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)