DownloadWorker: Update downloadedBytes when file exists as well

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-03-22 17:45:14 +05:30
parent 6ec6efaf06
commit 5c5b48c6c1

View File

@@ -245,6 +245,7 @@ class DownloadWorker @AssistedInject constructor(
// If file exists and sha matches the request, no need to download again
if (requestFile.exists() && validSha(requestFile, expectedSha, algorithm)) {
Log.i(TAG, "$requestFile is already downloaded!")
downloadedBytes += requestFile.length()
return@withContext Result.success()
}