Permalink
Browse files

o pass through: max accessed limited by file-size.

  • Loading branch information...
1 parent 3b4edf6 commit 03a0c77c5b85647d99a2cfad099b1e2e50ede340 @hzeller committed Nov 18, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 pass-through-handler.cc
View
@@ -52,6 +52,7 @@ int PassThroughHandler::Stat(struct stat *st) {
void PassThroughHandler::GetHandlerStatus(HandlerStats *stats) {
*stats = info_stats_;
if (file_size_ > 0) {
+ max_accessed_ = std::min(max_accessed_, file_size_);
stats->access_progress = 1.0 * max_accessed_ / file_size_;
stats->buffer_progress = stats->access_progress;
}

0 comments on commit 03a0c77

Please sign in to comment.