From 4a91912f53227e6f0441cd181c6b5806b7c58f66 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Thu, 28 Jun 2018 16:23:55 +0200 Subject: [PATCH] [enh] sync: set storage watcher to download's level if cautious mode --- app/modules/crawler/lib/sync/ChunkGetter.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/modules/crawler/lib/sync/ChunkGetter.ts b/app/modules/crawler/lib/sync/ChunkGetter.ts index ed9c01cce..91dca6501 100644 --- a/app/modules/crawler/lib/sync/ChunkGetter.ts +++ b/app/modules/crawler/lib/sync/ChunkGetter.ts @@ -200,6 +200,8 @@ export class ChunkGetter { })) this.writtenChunks++ this.watcher.storagePercent(Math.round(this.writtenChunks / this.numberOfChunksToDownload * 100)); + } else { + this.watcher.storagePercent(parseInt((this.downloadedChunks / this.numberOfChunksToDownload * 100).toFixed(0))) } // Returns a promise of file content -- GitLab