Skip to content

Commit 3426f7b

Browse files
author
Bojan Nikolic
committed
Add comment on seekable property of infd
1 parent 1316d6a commit 3426f7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/shutil.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ def _fastcopy_sendfile(fsrc, fdst):
224224
# sendfile in a mode that does not update the
225225
# input fd position when reading. Hence seek the
226226
# input fd to the correct position before falling
227-
# back on POSIX read/write method
227+
# back on POSIX read/write method. Since sendfile
228+
# requires mmapable infd, it should also be seekable
228229
os.lseek(infd, dstpos, os.SEEK_SET)
229230

230231
raise _GiveupOnFastCopy(err)

0 commit comments

Comments
 (0)