File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3526,13 +3526,15 @@ def _pwrite_syscall(
35263526 verify if isinstance (verify , int ) else self ._buffer_size (data )
35273527 )
35283528 bytes_just_written : int = os .pwrite (self ._fd , data , offset )
3529- bytes_written += bytes_just_written
3529+ if bytes_just_written > 0 :
3530+ bytes_written += bytes_just_written
35303531 while bytes_written < expected_bytes_written and bytes_just_written > 0 :
35313532 # Writes larger than ~2 GiB may not complete in a single pwrite call
35323533 offset += bytes_just_written
35333534 with self ._mv_suffix (data , bytes_written ) as mv :
35343535 bytes_just_written = os .pwrite (self ._fd , mv , offset )
3535- bytes_written += bytes_just_written
3536+ if bytes_just_written > 0 :
3537+ bytes_written += bytes_just_written
35363538 if isinstance (verify , int ) or verify :
35373539 self ._verify_bytes_written (bytes_written , expected_bytes_written )
35383540 return bytes_written
You can’t perform that action at this time.
0 commit comments