From 7a3c55af35479cfa87b54e03770008330dee7227 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Wed, 7 Feb 2007 21:21:19 -0800 Subject: [PATCH] fix SEEK_END when set_extent() --- src/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.cpp b/src/file.cpp index 8962ac39..7022a94f 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -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)