瀏覽代碼

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 15 年之前
父節點
當前提交
4280650e29
共有 1 個文件被更改,包括 5 次插入1 次删除
  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()