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
+1 -1
View File
@@ -178,7 +178,7 @@ void FileBase::seek(off_t off, int whence)
if (whence == SEEK_END) { if (whence == SEEK_END) {
if (off > 0) if (off > 0)
throwIOException("bad seek 3"); throwIOException("bad seek 3");
off += _length; off += _offset + _length;
whence = SEEK_SET; whence = SEEK_SET;
} }
if (::lseek(_fd,off,whence) < 0) if (::lseek(_fd,off,whence) < 0)