DownloadWorker: Update downloadedBytes when file exists as well
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -245,6 +245,7 @@ class DownloadWorker @AssistedInject constructor(
|
|||||||
// If file exists and sha matches the request, no need to download again
|
// If file exists and sha matches the request, no need to download again
|
||||||
if (requestFile.exists() && validSha(requestFile, expectedSha, algorithm)) {
|
if (requestFile.exists() && validSha(requestFile, expectedSha, algorithm)) {
|
||||||
Log.i(TAG, "$requestFile is already downloaded!")
|
Log.i(TAG, "$requestFile is already downloaded!")
|
||||||
|
downloadedBytes += requestFile.length()
|
||||||
return@withContext Result.success()
|
return@withContext Result.success()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user