fix bug in prefetch confirmation
This commit is contained in:
parent
db89be96ef
commit
0a63d74a69
|
@ -92,7 +92,8 @@ class SFTPFile (BufferedFile):
|
||||||
k.sort(cmp=lambda x, y: cmp(x[0], y[0]))
|
k.sort(cmp=lambda x, y: cmp(x[0], y[0]))
|
||||||
buf_offset, buf_size = k[-1]
|
buf_offset, buf_size = k[-1]
|
||||||
if buf_offset + buf_size <= offset:
|
if buf_offset + buf_size <= offset:
|
||||||
return True
|
# prefetch request ends before this one begins
|
||||||
|
return False
|
||||||
if buf_offset + buf_size >= offset + size:
|
if buf_offset + buf_size >= offset + size:
|
||||||
# inclusive
|
# inclusive
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue