Explorar o código

2010-07-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

	Fixed the bug that
	AdaptiveFileAllocationIterator::getCurrentLength() does not return
	updated allocated bytes.
	* src/AdaptiveFileAllocationIterator.h
Tatsuhiro Tsujikawa %!s(int64=15) %!d(string=hai) anos
pai
achega
4280650e29
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/AdaptiveFileAllocationIterator.h

+ 5 - 1
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()