Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix oom during chunk combination

Neeraj Gupta9245af50804b
diff --git a/mobile/lib/module/download/manager.dart b/mobile/lib/module/download/manager.dart
index e9a5513725..c93dfde066 100644
--- a/mobile/lib/module/download/manager.dart
+++ b/mobile/lib/module/download/manager.dart
@@ -304,8 +304,7 @@ class DownloadManager {
try {
for (int i = 1; i <= totalChunks; i++) {
final chunkFile = File(_getChunkPath(basePath, i));
- final bytes = await chunkFile.readAsBytes();
- sink.add(bytes);
+ await sink.addStream(chunkFile.openRead());
await chunkFile.delete();
}
} finally {