aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 3c0ca319225..178cda856a6 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -586,7 +586,10 @@ OC.Uploader.prototype = _.extend({
_.each(uploads, function(upload) {
self._uploads[upload.data.uploadId] = upload;
});
- self.totalToUpload = _.reduce(uploads, function(memo, upload) { return memo+upload.getFile().size; }, 0);
+ if (!self._uploading) {
+ self.totalToUpload = 0;
+ }
+ self.totalToUpload += _.reduce(uploads, function(memo, upload) { return memo+upload.getFile().size; }, 0);
var semaphore = new OCA.Files.Semaphore(5);
var promises = _.map(uploads, function(upload) {
return semaphore.acquire().then(function(){