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]))
|
||||
buf_offset, buf_size = k[-1]
|
||||
if buf_offset + buf_size <= offset:
|
||||
return True
|
||||
# prefetch request ends before this one begins
|
||||
return False
|
||||
if buf_offset + buf_size >= offset + size:
|
||||
# inclusive
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue