From 4280650e299cd880993f9a256fd267ceeceac303 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 31 Jul 2010 13:58:25 +0000 Subject: [PATCH] 2010-07-31 Tatsuhiro Tsujikawa Fixed the bug that AdaptiveFileAllocationIterator::getCurrentLength() does not return updated allocated bytes. * src/AdaptiveFileAllocationIterator.h --- src/AdaptiveFileAllocationIterator.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AdaptiveFileAllocationIterator.h b/src/AdaptiveFileAllocationIterator.h index 7a5cd51d2..637a7cae1 100644 --- a/src/AdaptiveFileAllocationIterator.h +++ b/src/AdaptiveFileAllocationIterator.h @@ -66,7 +66,11 @@ public: virtual off_t getCurrentLength() { - return offset_; + if(allocator_.isNull()) { + return offset_; + } else { + return allocator_->getCurrentLength(); + } } virtual uint64_t getTotalLength()