Skip to content

Commit 0b02981

Browse files
hellaisevilaliv3
authored andcommitted
Fix other references to old code
1 parent 52ccb07 commit 0b02981

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/flow.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@
723723
* File size
724724
* @type {number}
725725
*/
726-
this.size = this.fileProxy.size;
726+
this.size = file.size;
727727

728728
/**
729729
* Relative file path
@@ -1122,19 +1122,19 @@
11221122
* Size of a chunk
11231123
* @type {number}
11241124
*/
1125-
var chunkSize = this.flowObj.opts.chunkSize;
1125+
this.chunkSize = this.flowObj.opts.chunkSize;
11261126

11271127
/**
11281128
* Chunk start byte in a file
11291129
* @type {number}
11301130
*/
1131-
this.startByte = this.offset * chunkSize;
1131+
this.startByte = this.offset * this.chunkSize;
11321132

11331133
/**
11341134
* Chunk end byte in a file
11351135
* @type {number}
11361136
*/
1137-
this.endByte = Math.min(this.fileObj.size, (this.offset + 1) * chunkSize);
1137+
this.endByte = Math.min(this.fileObj.size, (this.offset + 1) * this.chunkSize);
11381138

11391139
this.data = null;
11401140

@@ -1272,11 +1272,11 @@
12721272
preprocessFinished: function () {
12731273
// Compute the endByte after the preprocess function to allow an
12741274
// implementer of preprocess to set the fileObj size
1275-
this.endByte = Math.min(this.fileObj.size, (this.offset + 1) * chunkSize);
1276-
if (this.fileObj.size - this.endByte < chunkSize &&
1275+
this.endByte = Math.min(this.fileObj.size, (this.offset + 1) * this.chunkSize);
1276+
if (this.fileObj.size - this.endByte < this.chunkSize &&
12771277
!this.flowObj.opts.forceChunkSize) {
12781278
// The last chunk will be bigger than the chunk size,
1279-
// but less than 2*chunkSize
1279+
// but less than 2*this.chunkSize
12801280
this.endByte = this.fileObj.size;
12811281
}
12821282
this.preprocessState = 2;

0 commit comments

Comments
 (0)