Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix error when downloading file in debug mode

ashilkne02739097367
diff --git a/lib/utils/file_download_util.dart b/lib/utils/file_download_util.dart
index 527018f679..f99a435276 100644
--- a/lib/utils/file_download_util.dart
+++ b/lib/utils/file_download_util.dart
@@ -37,7 +37,7 @@ Future<File?> downloadAndDecrypt(
headers: {"X-Auth-Token": Configuration.instance.getToken()},
),
onReceiveProgress: (a, b) {
- if (kDebugMode) {
+ if (kDebugMode && a >= 0 && b >= 0) {
_logger.fine(
"$logPrefix download progress: ${formatBytes(a)} / ${formatBytes(b)}",
);