Commit 3ccf3939 authored by Nicolas Raynaud's avatar Nicolas Raynaud

allow files size up to 2^53 to be read

parent 8803ce3d
......@@ -38,7 +38,7 @@ module.exports = function(filename, options, cb){
;
// get file length
for(var i=0;i<file.EndofFile.length;i++){
fileLength |= file.EndofFile[i] << (i*8);
fileLength += file.EndofFile[i] * Math.pow(2, i * 8);
}
var result = new Buffer(fileLength);
// callback manager
......
......@@ -24,7 +24,7 @@ class SmbReadableStream extends Readable {
let fileLength = 0
for (let i = 0; i < file.EndofFile.length; i++) {
fileLength |= file.EndofFile[i] << (i * 8)
fileLength += file.EndofFile[i] * Math.pow(2, i * 8);
}
this.fileLength = fileLength
this.wait = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment