From a2e037d6af08573d82a19520ae987e14c569f8bf Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 15 Oct 2024 22:39:48 +0000 Subject: [PATCH] u2c: fix chunksize calculation files which were exactly 128 GiB large would fail (you can't make this shit up) --- bin/u2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/u2c.py b/bin/u2c.py index e037f2ec..2ba35328 100755 --- a/bin/u2c.py +++ b/bin/u2c.py @@ -665,7 +665,7 @@ def up2k_chunksize(filesize): while True: for mul in [1, 2]: nchunks = math.ceil(filesize * 1.0 / chunksize) - if nchunks <= 256 or (chunksize >= 32 * 1024 * 1024 and nchunks < 4096): + if nchunks <= 256 or (chunksize >= 32 * 1024 * 1024 and nchunks <= 4096): return chunksize chunksize += stepsize