fix bug in prefetch confirmation
This commit is contained in:
Robey Pointer 2006-12-27 14:41:04 -05:00
parent db89be96ef
commit 0a63d74a69
1 changed files with 2 additions and 1 deletions

View File

@ -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