From 8f5e9f308db8e5409dfa0f8f99b5263f2cea65e7 Mon Sep 17 00:00:00 2001 From: Andre Asselin Date: Tue, 21 Feb 2017 12:50:29 -0500 Subject: [PATCH] Make progress bar more responsive when backing up large files --- .../webroot/ngax/scripts/controllers/StateController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/StateController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/StateController.js index c8c0980ff..2c32d8f85 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/StateController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/StateController.js @@ -34,8 +34,8 @@ backupApp.controller('StateController', function($scope, $timeout, ServerStatus, pg = 0; } else { var filesleft = $scope.state.lastPgEvent.TotalFileCount - $scope.state.lastPgEvent.ProcessedFileCount; - var sizeleft = $scope.state.lastPgEvent.TotalFileSize - $scope.state.lastPgEvent.ProcessedFileSize; - pg = $scope.state.lastPgEvent.ProcessedFileSize / $scope.state.lastPgEvent.TotalFileSize; + var sizeleft = $scope.state.lastPgEvent.TotalFileSize - $scope.state.lastPgEvent.ProcessedFileSize - $scope.state.lastPgEvent.CurrentFileoffset; + pg = ($scope.state.lastPgEvent.ProcessedFileSize + $scope.state.lastPgEvent.CurrentFileoffset) / $scope.state.lastPgEvent.TotalFileSize; if ($scope.state.lastPgEvent.ProcessedFileCount == 0) pg = 0;