Skip to content

Commit 7dd29f5

Browse files
committed
Fix empty file range request on Windows
1 parent bc87f85 commit 7dd29f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

asyncssh/sftp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ async def _request_ranges(file_obj: _SFTPFileObj, offset: int,
646646
if exc.errno != errno.ENXIO:
647647
raise
648648
else: # pragma: no cover
649-
yield offset, length
649+
if length:
650+
yield offset, length
650651

651652

652653
class _SFTPParallelIO(Generic[_T]):

0 commit comments

Comments
 (0)