summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
author Songchun Fan <schfan@google.com> 2020-08-25 13:12:16 -0700
committer Songchun Fan <schfan@google.com> 2020-08-25 13:17:28 -0700
commit425862f3e79087a914d4e3f0f7a94d6e999706ce (patch)
treea5d69cb4ef47599c03325270b3c89afd25d17e00 /services/incremental/IncrementalService.cpp
parentd6de4dcbd4775037efc2e4c085612056a5aefcad (diff)
[incremental] storage is regarded as fully loaded if there's no file or only empty files
Test: atest service.incremental_test BUG: 165799231 Change-Id: I3b6be3918d53ce4ab0a30a4da493d9730a31ed3c
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index ba6ae9262aea..9836262ec2b0 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -1706,8 +1706,8 @@ float IncrementalService::getLoadingProgressFromPath(const IncFsMount& ifs,
}
if (totalBlocks == 0) {
- LOG(ERROR) << "getLoadingProgress failed to get total num of blocks";
- return -EINVAL;
+ // No file in the storage or files are empty; regarded as fully loaded
+ return 1;
}
return (float)filledBlocks / (float)totalBlocks;
}