]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
shutil._copyfileobj_readinto: tiny speedup (#92377)
authorLucinda May Phipps <landfillbaby69@gmail.com>
Fri, 20 May 2022 15:14:05 +0000 (16:14 +0100)
committerGitHub <noreply@github.com>
Fri, 20 May 2022 15:14:05 +0000 (08:14 -0700)
Lib/shutil.py

index de82453aa56e1aac05b72f51c46738f78c8cc3e5..2cbd808abf2ffb0eae4af6bcc9f69f30af5d0ab8 100644 (file)
@@ -182,7 +182,8 @@ def _copyfileobj_readinto(fsrc, fdst, length=COPY_BUFSIZE):
                 break
             elif n < length:
                 with mv[:n] as smv:
-                    fdst.write(smv)
+                    fdst_write(smv)
+                break
             else:
                 fdst_write(mv)