File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -218,14 +218,15 @@ def _fastcopy_sendfile(fsrc, fdst):
218218 # ENODATA.
219219 _USE_CP_SENDFILE = False
220220
221+ # 'infd' and 'outfd' are assumed to be seekable, as
222+ # they are checked to be "regular" files.
221223 dstpos = os .lseek (outfd , 0 , os .SEEK_CUR )
222224 if dstpos > 0 :
223225 # Some data has already been written but we use
224226 # sendfile in a mode that does not update the
225227 # input fd position when reading. Hence seek the
226228 # input fd to the correct position before falling
227- # back on POSIX read/write method. Since sendfile
228- # requires mmapable infd, it should also be seekable
229+ # back on POSIX read/write method.
229230 os .lseek (infd , dstpos , os .SEEK_SET )
230231
231232 raise _GiveupOnFastCopy (err )
You can’t perform that action at this time.
0 commit comments