Skip to content

Commit 4ef448d

Browse files
committed
fix request start position for chunks larger than 31952 bytes
1 parent a95767c commit 4ef448d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/protocol/SFTP.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,7 @@ function read_(self, handle, buf, off, len, position, cb, req_) {
19861986
const req = (req_ || {
19871987
nb: 0,
19881988
position,
1989+
origPosition: position,
19891990
off,
19901991
origOff: off,
19911992
len: undefined,
@@ -2012,7 +2013,7 @@ function read_(self, handle, buf, off, len, position, cb, req_) {
20122013
data = buf;
20132014
else
20142015
data = bufferSlice(buf, req.origOff, req.origOff + req.nb + nb);
2015-
cb(undefined, req.nb + nb, data, req.position);
2016+
cb(undefined, req.nb + nb, data, req.origPosition);
20162017
},
20172018
buffer: undefined,
20182019
});

0 commit comments

Comments
 (0)