# HG changeset patch # User Henry S. Thompson # Date 1773252461 0 # Node ID bc1440870a4e4c2fd934aabe1f855802507edff3 # Parent 8c9e7578ed30e54292e07d3e71c19e463fcbb166 fixed last-buffer bug diff -r 8c9e7578ed30 -r bc1440870a4e lib/python/cc/warc.py --- a/lib/python/cc/warc.py Wed Mar 11 16:08:35 2026 +0000 +++ b/lib/python/cc/warc.py Wed Mar 11 18:07:41 2026 +0000 @@ -206,7 +206,8 @@ with memoryview(buf)[keepLen:BUFSIZE] as xBuf: nb=f.readinto(xBuf) bl = keepLen+nb - done = bl < BUFSIZE + if (done := (bl < BUFSIZE)): + bufView = bufView[0:bl] bp = 0 fp.close() f.close()